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

MultiSelect initialSelectedItems #5821

Closed
bourdakos1 opened this issue Apr 7, 2020 · 3 comments
Closed

MultiSelect initialSelectedItems #5821

bourdakos1 opened this issue Apr 7, 2020 · 3 comments

Comments

@bourdakos1
Copy link

The MultiSelect component has an initialSelectedItems prop that can only be set once.

usage:

const [selected, setSelected] = useState(["cat"])
<MultiSelect initialSelectedItems={selected}>

behavior: cat is selected

update selected state:

setSelected(["dog", "fish"])

behavior: cat is selected
expected: dog and fish are selected

@emyarod
Copy link
Member

emyarod commented Apr 7, 2020

related #4812

@bourdakos1
Copy link
Author

@MaxShapiro32

@asudoh
Copy link
Contributor

asudoh commented Apr 12, 2020

Hi 👋 thank you for reporting. Given the nature of initialSomething properties, it's not meant for after-creation updates. So looks that your request is same as #4812 as @emyarod pointed out.

@asudoh asudoh closed this as completed Apr 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants