https://codesandbox.io/s/pQoyXymr2 Here's the demo. It seems Dropdown only receive defaultValue once, and not changing after, why?
Asked
Active
Viewed 309 times
1 Answers
1
defaultValue
will affect only initial component value
, so need to use the value
prop to control Dropdown's value. This follows React's patterns with uncontrolled and controlled components.
![](../../users/profiles/6488546.webp)
Oleksandr Fediashov
- 3,967
- 1
- 20
- 40