-
Notifications
You must be signed in to change notification settings - Fork 403
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
Bug in sorting related to initialSortBy #436
Comments
you need to take care of the 0 length case when sort is changed:
closing. |
Sorry, but the .reduce correctly returns an empty array when params.selectedRows is empty. I carefully debug the problem before I opened the issue, and I cannot see any problem in this simple code. |
apologies for the initial haste, I'll re-open this. However if i comment out this.selectedIds assignment... everything seems to be working fine. I'll debug it more. |
looks like if I don't print out {{ selectedIds }} , everything is working as well. strange. |
Yes, as I wrote at the beginning, three things will make the script work:
1 and 2 sound inexplicable to me (after about 2 years of Vue developing) If you look at console, it seems that the method is triggered three times every time you change sorting. |
so just published 2.15.2 and seems to have passed all my tests... I'm going to keep this open for a bit so we can test with your jsfiddle |
ok tested with your fiddle... seems to be working well now. Thanks for reporting this! |
Thank you to you for so fast fix! 👍 |
Issue Type
Specs
What version are you using?
2.15.0
What browser?
Chrome 69.0.3497.100, Safari 12.0
Expected Behavior
Sort changes when clicking on column headers
Actual Behavior
Sort does not change
Steps to Reproduce the Problem
https://jsfiddle.net/gira82/cq4etkp6/1/
Basically I need to have an array of ids related to selected rows.
So I have a selectionChanged method that reduce the rows selected to an array of ids.
In the fiddle I attached there are three things that make the sort working:
I think there is something not working properly in the sorting code.
Thank you
The text was updated successfully, but these errors were encountered: