Fritz
Fritz
@wuweiweiwu Therein lies the challenge, and the fun. Making an interface that makes sense to use for even a non-technical user. We should talk it out here before you get...
Just read an article that talked about react-beautiful-dnd having keyboard accessibility. I might check that out as an example implementation.
@wuweiweiwu https://medium.com/@alexandereardon/rethinking-drag-and-drop-d9f5770b4e6b
From the Troubleshooting section of the readme: react-dnd only allows for one DragDropContext at a time (see: https://github.com/gaearon/react-dnd/issues/186). To get around this, you can import the context-less tree component via...
Making the drag-and-drop ghost (/hovering thing) look like your image would be quite challenging, if not impossible, with the native drag-and-drop API. However, the other parts are feasible, like the...
In [`startDrag`](https://github.com/fritz-c/react-sortable-tree/blob/e66200e950fa874f4ad38f860acc705bf70495dd/src/react-sortable-tree.js#L197), remove all selected nodes from the tree, not just the one. This method produces the tree with all the dragged nodes removed, which will serve as a base...
I don't have a roadmap drawn up for the development of this component, and will probably just be doing bug fixes in the near future. That being said, I think...
Just want to note that the popular answer above will mutate the `keys` and `orders` array arguments because [`.reverse()` changes the array in-place](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reverse). Probably not an issue in most use...
Regarding dannsam's approach, you may want to change `'window:load'` to `'window:before:load'` if you are adding the `beforeunload` listener in some code executed on load.
Inertia's popstate listener (popstate being the event called when the back button is used) will asynchronously load the previous component, rendering it when it has loaded. https://github.com/inertiajs/inertia/blob/f34f373692a964933e4272fc49fa48552301e568/packages/core/src/router.ts#L480-L492 The problem arises...