-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Description
What's the correct way to set the initial value of a select when using asyncOptions?
Ideally this is what I'm looking for:
var initialOptions = [{value: "1", label: "One"}];
<Select value="1" options={initialOptions} asyncOptions={...} />The problem is that the component doesn't play nice with both options and asyncOptions being set. The componentWillReceiveProps method seems to inadvertently reset the options loaded asynchronously with the ones specified as props.
Am I doing something wrong, or do we need to implement an initialOptions prop (like initialValue for regular input elements)?
Related: vschoettke@78845b0
Metadata
Metadata
Assignees
Labels
No labels