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: Sorting not working as expected #4086
Comments
👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you've completed all the fields in the issue template so we can best help. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can. |
I have the same problem, and this seems to work for me. |
@Mental1993 I don't see the issue in our docs but you're correct: |
@layershifter, Hey can I work on this. |
@layershifter Will do;) |
Bug Report
Sorting in table does not work as expected
Steps
I copy and pasted the code from https://react.semantic-ui.com/collections/table/#variations-sortable. Sorting works fine the first time you sort for example name column or when you change column. But the second time you try to sort, it doesn't work
Expected Result
Sorting should be working, like the example in the docs
Actual Result
Sorting stops working after the first time.
Version
2.0.0
Proposal for fix
Maybe the reducer doesn't like the fact that it's state is manipulated directly (
state.data.reverse()
), so i tried to solve it bydata: _.reverse(_.clone(state.data))
data: state.data.slice().reverse()
Both ways seemed to work.
The text was updated successfully, but these errors were encountered: