wix-style-react
Version:
wix-style-react
18 lines (11 loc) • 865 B
Markdown
Previously, `selectedId` prop was used as hybrid of Controlled and Uncontrolled modes.
You could update the `selectedId` (Controlled), but when an option is selected, it would immediately set the state.
- Pass `upgrade=true` (`<Dropdown upgrade/>`)
- If you have been using `<Dropdown/>` as a controlled component, you are good to go.
- If you were just using `selectedId` to set the initially selected option, then you need to pass the option id in the `initialSelectedId` prop instead.
> The new API will be affective from the next major version.
See the [`<Dropdown/>` component docs](https://wix-wix-style-react.surge.sh/?selectedKind=Components&selectedStory=Dropdown&full=0&addons=0&stories=1&panelRight=0) for examples and API reference.