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

Rapidly adding and removing items from EntityListView results in duplications #26

Open
Rocketeer007 opened this issue Mar 15, 2024 · 0 comments

Comments

@Rocketeer007
Copy link

Given a sequence of add, remove, add events on an EntityList, the EntityListView can end up showing incorrect items.
For example:

entityList.add(a);
entityList.remove(a);
entityList.add(a);

The root cause of this appears to be that after adding item a, the wrapper in EntityListView is not fully updated; the new component is added to the changeQueue, but is not yet returned when iterating through elements in EntityListView.handleEntityRemoved

To resolve this, I think that EntityListView.handleEntityRemoved should instead call wrapper.getChildrenAsList(true) to include the queued changes when removing items.

Rocketeer007 pushed a commit to Rocketeer007/CodeRAD that referenced this issue Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant