0

https://codesandbox.io/s/pQoyXymr2 Here's the demo. It seems Dropdown only receive defaultValue once, and not changing after, why?

Fate Riddle
  • 346
  • 1
  • 2
  • 14

1 Answers1

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.

Oleksandr Fediashov
  • 3,967
  • 1
  • 20
  • 40