Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

@dseeker

Description

@dseeker

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions