0

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

Fate Riddle
  • 364
  • 1
  • 3
  • 15

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
  • 4,315
  • 1
  • 24
  • 42