I have a React component:
<Dropdown placeholder={field[propName].label} id={propName} fluid multiple selection search defaultValue={defaultOptions} options={options} />
So options and defaultOptions are the same arrays of the {text: 'string, value: 'string'} structure.
In the semantic source code of the UI, I found this:
defaultValue: PropTypes.oneOfType([ PropTypes.string, PropTypes.number, PropTypes.arrayOf(PropTypes.oneOfType([ PropTypes.string, PropTypes.number, ])), ])
This is why my code above gives me an error:
`Warning: Failed propType: Invalid prop `defaultValue` supplied to `Dropdown`. Check the render method of `View`.`
So the question is, how then should I set defaultValue for the Dropdown multiple select type?
source share