Skip to content
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

Asyncronous adding items at higher index than total list count #77

Open
dseeker opened this issue Nov 19, 2020 · 0 comments
Open

Asyncronous adding items at higher index than total list count #77

dseeker opened this issue Nov 19, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@dseeker
Copy link

dseeker commented Nov 19, 2020

Is your feature request related to a problem? Please describe.
When building the UI, the application is asynchronously loading content separately for 3 components. Depending on the API response time, some are finished before others. They index ordering is 0,1,2 but they may get built in random order (register 2, register 0, register 1). I'm passing the index on the registration command, but if I add a node with index 2 on a list of 1 node, it will get added in index 1, thus conflicting with the subsequent node.

Describe the solution you'd like
The node should be added in the correct index even with a shorter list. Perhaps lrud could add a "ghost" or temporary node between the non existing node index, and replace it with the real node when it gets registered with that index

Describe alternatives you've considered
Having an abstraction that will receive the registration events but only passing them to lrud once all of them are loaded, but it seems like the library should be able to handle that by itself

@dseeker dseeker added the enhancement New feature or request label Nov 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant