mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
feat: support item.disabled
key for Dropdown
, MultiSelect
, ComboBox
(#1328)
Closes #1326 * feat: support item.disabled key for `Dropdown`, `MultiSelect`, `ComboBox` * Run "yarn build:docs" * test: assert disabled property * docs: add "Disabled items" examples
This commit is contained in:
parent
22f93ee675
commit
f25a10c9c4
16 changed files with 150 additions and 19 deletions
|
@ -646,6 +646,7 @@ export type ComboBoxItemId = any;
|
|||
export interface ComboBoxItem {
|
||||
id: ComboBoxItemId;
|
||||
text: string;
|
||||
disabled?: boolean;
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -1140,6 +1141,7 @@ export type DropdownItemText = string;
|
|||
export interface DropdownItem {
|
||||
id: DropdownItemId;
|
||||
text: DropdownItemText;
|
||||
disabled?: boolean;
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -2085,6 +2087,7 @@ None.
|
|||
| :---------- | :------- | :--------------- | :------- | -------------------- | ------------------ | --------------------------------------------- |
|
||||
| active | No | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to enable the active state |
|
||||
| highlighted | No | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to enable the highlighted state |
|
||||
| disabled | No | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to disable the menu item |
|
||||
|
||||
### Slots
|
||||
|
||||
|
@ -2327,6 +2330,7 @@ export type MultiSelectItemText = string;
|
|||
export interface MultiSelectItem {
|
||||
id: MultiSelectItemId;
|
||||
text: MultiSelectItemText;
|
||||
disabled?: boolean;
|
||||
}
|
||||
```
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue