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

Removing a column with filter set will filter all data #787

Closed
snowzach opened this issue Oct 22, 2016 · 8 comments
Closed

Removing a column with filter set will filter all data #787

snowzach opened this issue Oct 22, 2016 · 8 comments

Comments

@snowzach
Copy link

snowzach commented Oct 22, 2016

I am dynamically adding and removing columns from the table. If I remove a column that has a filter set, it seems to filter all of the rows from what's left in the table until I re-enable the column and then change the filter value.

@snowzach
Copy link
Author

Okay, if I call applyFilter('') on a column just before it is removed it doesn't cause a problem.

@AllenFang
Copy link
Owner

ok, feel free to discuss with me if you got some trouble, I'll spend some time to check this out. Thanks

@snowzach
Copy link
Author

It still kind of feels like a bug to me. If a column is removed from the table, it's like the filter remains but there is no data to filter (because the column is gone) on so it somehow defaults to filtering all the data.

@AllenFang
Copy link
Owner

@snowzach, any simple example for me to reproduce this issue? thanks you 👍

@louisblin
Copy link
Contributor

Hi @AllenFang ,

I ran into the same issue recently, here is a minimal example that reproduces the problem - https://jsfiddle.net/x631b92m/. It does feel like a bug, I could work on a PR if that's something you'd like to fix.

Thanks :)

@AllenFang
Copy link
Owner

@louisblin, thanks your example code, 👍 it's real a bug and any idea to fix it? i think I can fix it in near future, but if you want to contribute, will be welcome :)

@louisblin
Copy link
Contributor

louisblin commented Sep 5, 2017

Hi @AllenFang ,

It took me ages to find some time to spend on that, but I eventually got something working. I guess we should move the implementation discussion to the PR now

@AllenFang
Copy link
Owner

Released on v4.0.5, thanks 👍

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

No branches or pull requests

3 participants