Semantic-UI-React, Auswahl, Multi, kann defaultValue nicht setzen
Ich habe eine Reaktionskomponente:
<Dropdown
placeholder={field[propName].label}
id={propName}
fluid
multiple
selection
search
defaultValue={defaultOptions}
options={options}
/>
Sooptions
unddefaultOptions
ist die gleiche Struktur Arrays{text: 'string, value: 'string'}
.
m semantischen UI-Quellcode habe ich Folgendes gefunden:
/** Initial value or value array if multiple. */
defaultValue: PropTypes.oneOfType([
PropTypes.string,
PropTypes.number,
PropTypes.arrayOf(PropTypes.oneOfType([
PropTypes.string,
PropTypes.number,
])),
])
Das ist der Grund, warum mein Code über mir Fehler gibt:
`Warning: Failed propType: Invalid prop `defaultValue` supplied to `Dropdown`. Check the render method of `View`.`
So Frage ist, wie soll ich dann defaultValue für Mehrfachauswahl Typ von Dropdown einstellen?