Skip to content

how to setValue in MultiValueContainer #5772

Answered by sheeehy
ghost asked this question in Q&A
Discussion options

You must be logged in to vote

I don't think there's a more straightforward way to access setValue within MultiValueContainer. It's not provided access to some of the common props like setValue or clearValue, which can make it kind of inflexible if you want to perform those types of actions within the component.

Passing those methods manually via selectProps is probably the best way. It's a bit of a manual override, but it works within the flexibility that react-select provides.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant