feat: forward restProps to input element

This commit is contained in:
Eric Y Liu 2021-03-13 06:06:31 -08:00
commit 576dedb9c3
14 changed files with 42 additions and 37 deletions

View file

@ -1397,7 +1397,7 @@
"ts": "interface ComboBoxItem { id: string; text: string; }"
}
],
"rest_props": { "type": "Element", "name": "div" }
"rest_props": { "type": "Element", "name": "input" }
},
{
"moduleName": "ComposedModal",
@ -2249,7 +2249,7 @@
{ "type": "forwarded", "name": "blur", "element": "input" }
],
"typedefs": [],
"rest_props": { "type": "Element", "name": "div" }
"rest_props": { "type": "Element", "name": "input" }
},
{
"moduleName": "DatePickerSkeleton",
@ -5430,7 +5430,7 @@
"ts": "interface MultiSelectItem { id: MultiSelectItemId; text: MultiSelectItemText; }"
}
],
"rest_props": { "type": "Element", "name": "div" }
"rest_props": { "type": "Element", "name": "input" }
},
{
"moduleName": "NotificationActionButton",
@ -5841,7 +5841,7 @@
"ts": "type NumberInputTranslationId = \"increment\" | \"decrement\""
}
],
"rest_props": { "type": "Element", "name": "div" }
"rest_props": { "type": "Element", "name": "input" }
},
{
"moduleName": "NumberInputSkeleton",
@ -9797,7 +9797,7 @@
{ "type": "forwarded", "name": "blur", "element": "input" }
],
"typedefs": [],
"rest_props": { "type": "Element", "name": "div" }
"rest_props": { "type": "Element", "name": "input" }
},
{
"moduleName": "TimePickerSelect",

View file

@ -24,6 +24,16 @@ To prevent alphabetical item ordering, pass an empty function to the `sortItem`
sortItem="{() => {}}"
/>
### Filterable
`$$restProps` are spread to the underlying input element.
<MultiSelect spellcheck="false" filterable titleText="Contact" placeholder="Filter contact methods..."
items="{[{id: "0", text: "Slack"},
{id: "1", text: "Email"},
{id: "2", text: "Fax"}]}"
/>
### Initial selected items
To select (or bind) items, pass an array of item ids to `selectedIds`.
@ -93,13 +103,7 @@ Set `direction` to `"top"` for the dropdown menu to appear above the input.
{id: "2", text: "Fax"}]}"
/>
### Filterable
<MultiSelect filterable titleText="Contact" placeholder="Filter contact methods..."
items="{[{id: "0", text: "Slack"},
{id: "1", text: "Email"},
{id: "2", text: "Fax"}]}"
/>
### Invalid state