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

Fix re-render of same element in list taking on value of previous element in position #355

Open
rglover opened this issue Oct 13, 2023 · 0 comments
Assignees
Labels
bug Something isn't working @joystick.js/ui Related to the @joystick.js/ui package.
Projects

Comments

@rglover
Copy link
Contributor

rglover commented Oct 13, 2023

In a list, if there are two list items with the same element (e.g., 1, 2, 3 each with a select dropdown), if item 1 is removed, elements in item 2 will retain the values of item 1.

This is because Joystick's DOM engine doesn't see a unique element, but rather, the same HTML element. The fix is to somehow uniquely identify elements in a list/loop/each so that when we re-render, the correct attributes are updated.

@rglover rglover added bug Something isn't working @joystick.js/ui Related to the @joystick.js/ui package. labels Oct 13, 2023
@rglover rglover self-assigned this Oct 13, 2023
@rglover rglover added this to High Priority in 1.0.0 Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working @joystick.js/ui Related to the @joystick.js/ui package.
Projects
1.0.0
High Priority
Development

No branches or pull requests

1 participant