Manually re-render multiselect values to update internal state #5713
Unanswered
lucastobrazil
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
i have a bit of an odd case where the MultiSelect component has an internal checkbox too. This means each "Chip" that's visible with
isMulti=true
would perform an action that should trigger a re-render so that its internal state gets updated.As you can see in the video below (and code snippet underneath), the onClick of the checkbox does actually get triggered (as when i delete and re-add the chip, its state has now updated). So it looks to me like the react-select component has no reason to re-render, thus never re-rendering the child MultiValue component to show the new state.
Is it possible to manually trigger a re-render?
Screen.Recording.2023-07-27.at.12.03.59.am.mov
Beta Was this translation helpful? Give feedback.
All reactions