-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Description
Im trying to use your searchable dropdowns to create a form, it works fine on a new form but if you load one that saved partially filled I cannot seem to load the dropdown from a pre-determined value.
What I'm trying to do:
Load form with dropdown initial value set to Block.
How I'm trying to do it:
By using initialSelectedItem as described in Downshift documentation.
<MuiDownshift
items={dataOptions}
variant={"outlined"}
onStateChange={handleStateChange}
getInputProps={({ openMenu }) => ({
label: "Storage Type",
placeholder: "Select Storage Type"
})}
// initialSelectedItem={0}
// initialSelectedItem={"0"}
initialSelectedItem={"Block"}
margin="normal"
/>
Expected result:
Form loads with with the the "Block" entry already selected in the dropdown
Result:
I've tried different ways to specify the value but none seem to work, I always end up with the Label.
Code Sandbox:
https://codesandbox.io/embed/vigorous-kalam-jzq4o
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels