-
-
Notifications
You must be signed in to change notification settings - Fork 69
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
Improve column toggling UX #518
Comments
Hey, @gfazioli! Basically, in this commit I've moved the column toggling popover on the table header. You can test it locally in this page: http://localhost:3000/examples/column-dragging-and-toggling/#column-toggling It looks to me like it's working perfectly, but since you're the author of the feature, I thought I should ask for your opinion, in case there are hidden issues I'm not aware of. Thanks again for everything! |
Hey, I just checked and it works like a charm for me too. I think this way is definitely better. Well done 👍 btw, I would like to discuss this enhancement as it could be useful for column management. wdyt? |
I just published it in Yes, I am open to discuss a generic header enhancement. I remember somebody else was asking for it a while ago, but it wasn't top priority for me (my personal use-cases were handled differently) and apparently so far no one else was motivated enough to come up with a valid PR. I guess the most basic functionality would be to simply provide the users the ability to supply a custom header component, which would be rendered above the column headers but inside the table border. I'd be reluctant, however, to do any kind of search logic inside the DataTable component itself because in real-life projects this is usually done on the server-side. Regarding this:
I'm afraid this would open a totally different can of worms. I'm not sure, but I think adding something like this would increase the complexity of the code a lot and I have a feeling it would make the component perform sluggish. There are always users keenly asking for features that would satisfy their particular use-cases, but without really taking into consideration how those features would impact other pre-existing features, or the overall performance of the library. Sorting through such feature requests and deciding which ones make sense to implement is something that should be done with extreme carry, in my experience. There are also users that raise feature requests motivated by the idea that - and I quote - "Mantine React Table has it". Which, in my opinion, is not a good enough reason. Different packages have different - and often contradictory - feature sets and approaches, and users are free to choose between them. For instance, here were a few key points that were very important for me when I started this library:
I think I digressed a bit, but I wanted to clarify the above to you, @gfazioli, since you were one of the few users who actually took the time to come up with valuable PRs instead of just asking for features 🙏 |
I think there's some room for improvement in the column toggling UX.
In my opinion, the toggling menu should be on the header instead of the toggleable columns.
That way, the user would not experience "jumps" when toggling columns using the menu, and we'd have fewer components and DOM elements created, so the entire code would probably be more efficient.
What do you think, @gfazioli?
The text was updated successfully, but these errors were encountered: