ui-components icon indicating copy to clipboard operation
ui-components copied to clipboard

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

Open pedrorebelocosta opened this issue 2 years ago • 0 comments

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 avatar Jul 03 '23 14:07 pedrorebelocosta