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

Use array instead of object to pass selected items as a prop to select-multi-options #311

Open
pedrorebelocosta opened this issue Jul 3, 2023 · 0 comments

Comments

@pedrorebelocosta
Copy link
Contributor

At the moment we are using an object (map) to pass the selected options to our select-multi-options component and the current behaviour has some inconsistencies where the selectedOptions map can contain options that are not selected but with a value of false #308 was created to try and address this issue and use ES2015 string key insertion order to guarantee that the keys can be iterated in the order they were created in.

On that PR @djcouto suggested the usage of an array to keep track of selected items as that data structure seems to fit this use case better, which I agree with and think we should move forward with, let me know you think about this.

@pedrorebelocosta pedrorebelocosta changed the title use array instead of object to pass selected items as a prop to select-multi-options Use array instead of object to pass selected items as a prop to select-multi-options Jul 3, 2023
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