mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 19:46:36 +00:00
feat: forward restProps to input element
This commit is contained in:
parent
6a609240cd
commit
576dedb9c3
14 changed files with 42 additions and 37 deletions
|
@ -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",
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue