react-table-hoc-draggable-columns icon indicating copy to clipboard operation
react-table-hoc-draggable-columns copied to clipboard

Changing the actual draggable columns after first render, does not work.

Open ds-martinso opened this issue 5 years ago • 3 comments

On first render, passing in whatever columns that should be draggable works perfectly. It is possible to add columns to the draggable list.

However, it is not working when I remove a column from the draggable list. Even if it updates and rerenders, the removed column is still draggable. It will however respect the change on browser refresh.

When looking in the inspector, the column class div gets a "draggable=true", but when passing in an empty array for draggable, it does not remove the draggable=true attribute immediately. You have to reorder a column in order to refresh so that the attribute goes away. Do I have to make a full rerender myself?

How come it is like this?

ds-martinso avatar Nov 11 '20 13:11 ds-martinso

Hi @ds-martinso

I took a hiatus from supporting this package but I am now getting back into it. I will take a look at this issue and see if there is anything that can be done.

patricktran avatar Mar 02 '21 01:03 patricktran

Hi @patricktran Thanks for the reply, and great to see that you are back. I will be moving to react-table v7, so this library is no longer of use to me. But I hope this finding will be of use, and keep up with the great work!

ds-martinso avatar Mar 02 '21 07:03 ds-martinso

@ds-martinso Would you be able to provide a demo of what the issue is?

Feel free to create a fork of this: https://codesandbox.io/s/lucid-goodall-f8swq?file=/src/App.js

patricktran avatar Mar 03 '21 00:03 patricktran