-
-
Notifications
You must be signed in to change notification settings - Fork 969
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
Sorted list not displayed correctly in riot v3.0.5 #2205
Comments
works with |
It seems to be not dealing with the changing values correctly
remove this and the new values sort correctly |
Using
I still have sorting problems when deleting and adding items :
|
@cristi-salcescu it's a bug thanks for reporting it. I made a simpler example starting from your original code https://jsfiddle.net/b8zm0bg7/. We will fix it soon |
There are still problems in 3.0.6 when testing it with more items (50) and using setInterval not setTimeout. |
@cristi-salcescu the problem seems to be in underscore, it modifies your original array I have tried with the normal js sort function and everything works fine https://jsfiddle.net/7sw8k4qu/7/ |
In https://jsfiddle.net/7sw8k4qu/7/ the sort function is using "name" property which is undefined. It should sort by "fname". |
I'm also having issues on v3.0.7 with adding to and updating a list, then sorting it. I used both underscore sortBy() and plain javascript sort() functions--both had the same issue. After many hours, I found out about "no-reorder" and ended up adding it to the loop tag and it worked. No idea what no-reorder does or why it worked. |
I also have this similar issue. In it's case , new create object is always sorted last element. It might be better |
Splicing arrays really goes mad in 3.0.7. It pulls extra objects or even duplicates them (in DOM). |
I'm trying to figure out a bug, and I think it might be related. https://output.jsbin.com/jujobe#/todos/active Whenever I mark the input check on this todo-list, the correctly marked item disappears from the list, but something I do not know is ticking other input checks in my list, even without rendering the checked attribute on dom. Removing |
Ran into this same issue. Here is another complete example of the problem in case it helps: It works with no-reorder, but without if you try typing in something that filters (try putting "mo" in the box) and then clearing that field out you get all the records back but in the wrong sequence. It's not a matter of arrays being out of sequence in the view's data, because it works by just adding 'no-reorder'. Something in the DOM rendering is causing this. Was able to reproduce the problem in 3.0.7 and 3.0.6 but not in 3.0.5. |
change your 77 line to:
|
@papas-source it is a sadisic performance killer O_O |
I have problems displaying a sorted list in riotjs v3.0.5
I created a sample where every 3s a list of objects is modified, then sorted and displayed with riot.
https://jsfiddle.net/cristi_salcescu/4gpmovqa/
All browsers
3.0.5
The text was updated successfully, but these errors were encountered: