Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ds-martinso opened this issue Nov 11, 2020 · 3 comments

Comments

@ds-martinso
Copy link

ds-martinso commented Nov 11, 2020

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?

@patricktran
Copy link
Owner

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.

@ds-martinso
Copy link
Author

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!

@patricktran
Copy link
Owner

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants