-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Table sortable #926
Comments
As far as I know there isn't a baked-in feature for sorting a table (I could be wrong, there's a lot of stuff not in the docs). If I were in your position I would set a onClick event for the icon and just sort the data myself. |
We do not currently support sortable tables, the only supported features are those which have props. I believe the sorting should happen outside of the component, though, we should certainly provide the callbacks and props for enabling sorting. I'd gladly accept a PR that added this. |
Ok thanks for the information. I will try to add the sorting myself and see if it fits into the lib. |
@ssachtleben I believe it is impossible to make universal sorting for lib but I would add at least props which will activate sorting visually and let everyone implemenet what is needed. @levithomason I can make PR with changes:
|
FWIW, I'm working on a generic table component in my spare time (supports sorting among other features). |
@belohlavek Yeah, that's what I believe is good. You can create custom data sort library and use |
@svrcekmichal Precisely what I was thinking. Then, users can use the click handlers to sort their data and re-render the table. |
Closing for housekeeping. Follow for #1195. |
Note, this is available in |
@ssachtleben did you have it working with the new release? can you share an example please |
Is sortable table somehow supported? There is no props for this so I tried to add it via the classNames:
The sort icon shows up but I cant click on the headers to change the sorting.
Anyone got an idea?
The text was updated successfully, but these errors were encountered: