-
-
Notifications
You must be signed in to change notification settings - Fork 356
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
Reordering large lists is slow #198
Comments
Hi @aaroncraigongithub, in my applications position is an integer. I think most developers do it that way. I guess you could have a detection of the type and act appropriately. However, what I think you want is this: https://github.com/mixonic/ranked-model Unfortunately it looks like it's dead (or hibernating!) which is a shame because I've used it in one of my projects too. |
@aaroncraigongithub, I'm going to close this for now. Feel free to continue the discussion here though. |
This is a really weird situation we have here – very sad ranked-model is not maintained. :) Probably a cool project for someone to create a partial fork of both. |
On a large list, something like move_to_top will trigger changes on every item in the list, which seems like overkill in most use cases.
If the :position field is a float, wouldn't it be easier to leverage more granularity in the position value so that moving an item in the list would affect only that single item?
That is, if my current list positions are 1, 2, 3 and I move 3 to the top, my new state could be 0.99, 1, 2, leaving the other two items in the list untouched.
I'm happy to work on a PR for this if it seems like something that would be acceptable.
The text was updated successfully, but these errors were encountered: