Please add support for drag-drop and rearrange columns
This is also a feature that could have a lot of collision with internal table state, and would likely be more involved that it appears on the surface. We'll put a pin in this one, as it is very interested and expected.
How would we handle touch support?
Would we handle the state internally or simply enforce this as a controlled input?
Would the column dragging be animated?
How much bloat does this add to the library that could otherwise be achieved as a plugin or user-implemented feature (with help from the wiki)?
Thanks for considering this feature.
How would we handle touch support?
I believe that people who want this kind of library also want all of the 'spreadsheet' features. And 99% of the user who use this are on laptops and may be 1% on tablets. So if any of the mobile features (especially sub-features like drag-n-drop) should be fine if it works just on full browser.
How much bloat does this add to the library that could otherwise be achieved as a plugin or user-implemented feature (with help from the wiki)?
Performance is the key. I know libraries charging $1000 - $2000 because of all the features and performance.
My suggestion is to build all these extra but necessary features as plugins or HOC.
That's the spirit!
I agree. I personally was using ag-grid when I decided to build react-table, and it is nice to have those features.
I think as long as we develop them as HOC's and keep them close under the wing of react-table (compatibility, updates, semver), then we should be okay. The smaller we can keep these addons, the better :)
As addons they should be independent of the core. HOCs are almost certainly the way forwards.
Lets shoot for an hoc or wiki entry to get the ball rolling
Hi
Take a look at this https://codesandbox.io/s/5vxlnjrw1n
Any updates on this being a feature in react-table?
@Jucesr , awesome work on the drag/drop, I am using the same in one of my project, but the unable to drag and drop in firefox, can you please help out?
Hi @bishwenduk029 , I ran into the same issue and I solved it by adding e.dataTransfer.setData("Text", i); to onDragStart. Apperently this is necessary in Firefox.
Hope this helps :) (Though you probably have already solved it, but for others)
I came up with a very simple solution to this. Here's my gist
https://gist.github.com/anazard/aaf842c47506ad5d87842e7c82196482
Most helpful comment
Hi
Take a look at this https://codesandbox.io/s/5vxlnjrw1n