-
-
Notifications
You must be signed in to change notification settings - Fork 50.9k
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
The select component is in uncontrolled mode. After selecting the value, modify the options, and the label of the value does not follow the modification #45734
Comments
find a solution, just remove undefined determine below
to
https://github.com/react-component/select/blob/ec0c6c748a24aa500ede15f1d2aacd0dacf4f63b/src/Select.tsx#L275 |
because when component re-render, rawLabel and rawKey not be re-assign value |
i fixed the demo |
|
@bbb169 思路是可以的,但是最好不要在 convert2LabelValues 里做。convert2LabelValues 最好是个纯函数,不应该加副作用。 |
Reproduction link
Steps to reproduce
step1: choose any option
step2: click change language button
step3: click select to see options
What is expected?
What is actually happening?
The text was updated successfully, but these errors were encountered: