let
| Yes | null | HTMLDivElement
| null
| Obtain a reference to the list HTML element |
-| ref | let
| Yes | null | HTMLInputElement
| null
| Obtain a reference to the input HTML element |
-| open | let
| Yes | boolean
| false
| Set to `true` to open the combobox menu dropdown |
-| value | let
| Yes | string
| ""
| Specify the selected combobox value |
-| selectedId | let
| Yes | ComboBoxItemId
| undefined
| Set the selected item by value id |
-| items | let
| No | ComboBoxItem[]
| []
| Set the combobox items |
-| itemToString | let
| No | (item: ComboBoxItem) => string
| (item) => item.text || item.id
| Override the display of a combobox item |
-| direction | let
| No | "bottom" | "top"
| "bottom"
| Specify the direction of the combobox dropdown menu |
-| size | let
| No | "sm" | "xl"
| undefined
| Set the size of the combobox |
-| disabled | let
| No | boolean
| false
| Set to `true` to disable the combobox |
-| titleText | let
| No | string
| ""
| Specify the title text of the combobox |
-| placeholder | let
| No | string
| ""
| Specify the placeholder text |
-| helperText | let
| No | string
| ""
| Specify the helper text |
-| invalidText | let
| No | string
| ""
| Specify the invalid state text |
-| invalid | let
| No | boolean
| false
| Set to `true` to indicate an invalid state |
-| warn | let
| No | boolean
| false
| Set to `true` to indicate an warning state |
-| warnText | let
| No | string
| ""
| Specify the warning state text |
-| light | let
| No | boolean
| false
| Set to `true` to enable the light variant |
-| shouldFilterItem | let
| No | (item: ComboBoxItem, value: string) => boolean
| () => true
| Determine if an item should be filtered given the current combobox value |
-| translateWithId | let
| No | (id: import("../ListBox/ListBoxMenuIcon.svelte").ListBoxMenuIconTranslationId) => string
| undefined
| Override the chevron icon label based on the open state.let
| No | (id: "clearSelection") => string
| undefined
| Override the label of the clear button when the input has a selection.let
| No | string
| "ccs-" + Math.random().toString(36)
| Set an id for the list box component |
-| name | let
| No | string
| undefined
| Specify a name attribute for the input |
-| clear | function
| No | (options?: { focus?: boolean; }) => void
| () => { prevSelectedId = null; highlightedIndex = -1; highlightedId = undefined; selectedId = undefined; selectedItem = undefined; open = false; inputValue = ""; if (options?.focus !== false) ref?.focus(); }
| Clear the combo box programmatically |
+| Prop name | Kind | Reactive | Type | Default value | Description |
+| :----------------------- | :-------------------- | :------- | :---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| listRef | let
| Yes | null | HTMLDivElement
| null
| Obtain a reference to the list HTML element |
+| ref | let
| Yes | null | HTMLInputElement
| null
| Obtain a reference to the input HTML element |
+| open | let
| Yes | boolean
| false
| Set to `true` to open the combobox menu dropdown |
+| value | let
| Yes | string
| ""
| Specify the selected combobox value |
+| selectedId | let
| Yes | ComboBoxItemId
| undefined
| Set the selected item by value id |
+| items | let
| No | ComboBoxItem[]
| []
| Set the combobox items |
+| itemToString | let
| No | (item: ComboBoxItem) => string
| (item) => item.text || item.id
| Override the display of a combobox item |
+| direction | let
| No | "bottom" | "top"
| "bottom"
| Specify the direction of the combobox dropdown menu |
+| size | let
| No | "sm" | "xl"
| undefined
| Set the size of the combobox |
+| disabled | let
| No | boolean
| false
| Set to `true` to disable the combobox |
+| titleText | let
| No | string
| ""
| Specify the title text of the combobox |
+| placeholder | let
| No | string
| ""
| Specify the placeholder text |
+| helperText | let
| No | string
| ""
| Specify the helper text |
+| invalidText | let
| No | string
| ""
| Specify the invalid state text |
+| invalid | let
| No | boolean
| false
| Set to `true` to indicate an invalid state |
+| warn | let
| No | boolean
| false
| Set to `true` to indicate an warning state |
+| warnText | let
| No | string
| ""
| Specify the warning state text |
+| light | let
| No | boolean
| false
| Set to `true` to enable the light variant |
+| shouldFilterItem | let
| No | (item: ComboBoxItem, value: string) => boolean
| () => true
| Determine if an item should be filtered given the current combobox value |
+| translateWithId | let
| No | (id: import("../ListBox/ListBoxMenuIcon.svelte").ListBoxMenuIconTranslationId) => string
| undefined
| Override the chevron icon label based on the open state.let
| No | (id: "clearSelection") => string
| undefined
| Override the label of the clear button when the input has a selection.let
| No | string
| "ccs-" + Math.random().toString(36)
| Set an id for the list box component |
+| name | let
| No | string
| undefined
| Specify a name attribute for the input |
+| clear | function
| No | (options?: { focus?: boolean; }) => void
| () => { prevSelectedId = null; highlightedIndex = -1; highlightedId = undefined; selectedId = undefined; selectedItem = undefined; open = false; inputValue = ""; if (options?.focus !== false) ref?.focus(); }
| Clear the combo box programmatically |
### Slots
@@ -2326,43 +2326,43 @@ export interface MultiSelectItem {
### Props
-| Prop name | Kind | Reactive | Type | Default value | Description |
-| :------------------- | :--------------- | :------- | :------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------- |
-| highlightedId | let
| Yes | null | MultiSelectItemId
| null
| Id of the highlighted ListBoxMenuItem |
-| selectionRef | let
| Yes | null | HTMLDivElement
| null
| Obtain a reference to the selection element |
-| fieldRef | let
| Yes | null | HTMLDivElement
| null
| Obtain a reference to the field box element |
-| multiSelectRef | let
| Yes | null | HTMLDivElement
| null
| Obtain a reference to the outer div element |
-| inputRef | let
| Yes | null | HTMLInputElement
| null
| Obtain a reference to the input HTML element |
-| open | let
| Yes | boolean
| false
| Set to `true` to open the dropdown |
-| value | let
| Yes | string
| ""
| Specify the multiselect value |
-| selectedIds | let
| Yes | MultiSelectItemId[]
| []
| Set the selected ids |
-| items | let
| Yes | MultiSelectItem[]
| []
| Set the multiselect items |
-| itemToString | let
| No | (item: MultiSelectItem) => any
| (item) => item.text || item.id
| Override the display of a multiselect item |
-| itemToInput | let
| No | (item: MultiSelectItem) => { name?: string; labelText?: any; title?: string; }
| (item) => {}
| Override the item name, title, labelText passed to the checkbox input |
-| size | let
| No | "sm" | "lg" | "xl"
| undefined
| Set the size of the combobox |
-| type | let
| No | "default" | "inline"
| "default"
| Specify the type of multiselect |
-| direction | let
| No | "bottom" | "top"
| "bottom"
| Specify the direction of the multiselect dropdown menu |
-| selectionFeedback | let
| No | "top" | "fixed" | "top-after-reopen"
| "top-after-reopen"
| Specify the selection feedback after selecting items |
-| disabled | let
| No | boolean
| false
| Set to `true` to disable the dropdown |
-| filterable | let
| No | boolean
| false
| Set to `true` to filter items |
-| filterItem | let
| No | (item: MultiSelectItem, value: string) => string
| (item, value) => item.text.toLowerCase().includes(value.trim().toLowerCase())
| Override the filtering logiclet
| No | boolean
| false
| Set to `true` to enable the light variant |
-| locale | let
| No | string
| "en"
| Specify the locale |
-| placeholder | let
| No | string
| ""
| Specify the placeholder text |
-| sortItem | let
| No | ((a: MultiSelectItem, b: MultiSelectItem) => MultiSelectItem) | (() => void)
| (a, b) => a.text.localeCompare(b.text, locale, { numeric: true })
| Override the sorting logiclet
| No | (id: import("../ListBox/ListBoxMenuIcon.svelte").ListBoxMenuIconTranslationId) => string
| undefined
| Override the chevron icon label based on the open state.let
| No | (id: import("../ListBox/ListBoxSelection.svelte").ListBoxSelectionTranslationId) => string
| undefined
| Override the label of the clear button when the input has a selection.let
| No | string
| ""
| Specify the title text |
-| useTitleInItem | let
| No | boolean
| false
| Set to `true` to pass the item to `itemToString` in the checkbox |
-| invalid | let
| No | boolean
| false
| Set to `true` to indicate an invalid state |
-| invalidText | let
| No | string
| ""
| Specify the invalid state text |
-| warn | let
| No | boolean
| false
| Set to `true` to indicate an warning state |
-| warnText | let
| No | string
| ""
| Specify the warning state text |
-| helperText | let
| No | string
| ""
| Specify the helper text |
-| label | let
| No | string
| ""
| Specify the list box label |
-| hideLabel | let
| No | boolean
| false
| Set to `true` to visually hide the label text |
-| id | let
| No | string
| "ccs-" + Math.random().toString(36)
| Set an id for the list box component |
-| name | let
| No | string
| undefined
| Specify a name attribute for the select |
+| Prop name | Kind | Reactive | Type | Default value | Description |
+| :----------------------- | :--------------- | :------- | :------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| highlightedId | let
| Yes | null | MultiSelectItemId
| null
| Id of the highlighted ListBoxMenuItem |
+| selectionRef | let
| Yes | null | HTMLDivElement
| null
| Obtain a reference to the selection element |
+| fieldRef | let
| Yes | null | HTMLDivElement
| null
| Obtain a reference to the field box element |
+| multiSelectRef | let
| Yes | null | HTMLDivElement
| null
| Obtain a reference to the outer div element |
+| inputRef | let
| Yes | null | HTMLInputElement
| null
| Obtain a reference to the input HTML element |
+| open | let
| Yes | boolean
| false
| Set to `true` to open the dropdown |
+| value | let
| Yes | string
| ""
| Specify the multiselect value |
+| selectedIds | let
| Yes | MultiSelectItemId[]
| []
| Set the selected ids |
+| items | let
| Yes | MultiSelectItem[]
| []
| Set the multiselect items |
+| itemToString | let
| No | (item: MultiSelectItem) => any
| (item) => item.text || item.id
| Override the display of a multiselect item |
+| itemToInput | let
| No | (item: MultiSelectItem) => { name?: string; labelText?: any; title?: string; }
| (item) => {}
| Override the item name, title, labelText passed to the checkbox input |
+| size | let
| No | "sm" | "lg" | "xl"
| undefined
| Set the size of the combobox |
+| type | let
| No | "default" | "inline"
| "default"
| Specify the type of multiselect |
+| direction | let
| No | "bottom" | "top"
| "bottom"
| Specify the direction of the multiselect dropdown menu |
+| selectionFeedback | let
| No | "top" | "fixed" | "top-after-reopen"
| "top-after-reopen"
| Specify the selection feedback after selecting items |
+| disabled | let
| No | boolean
| false
| Set to `true` to disable the dropdown |
+| filterable | let
| No | boolean
| false
| Set to `true` to filter items |
+| filterItem | let
| No | (item: MultiSelectItem, value: string) => string
| (item, value) => item.text.toLowerCase().includes(value.trim().toLowerCase())
| Override the filtering logiclet
| No | boolean
| false
| Set to `true` to enable the light variant |
+| locale | let
| No | string
| "en"
| Specify the locale |
+| placeholder | let
| No | string
| ""
| Specify the placeholder text |
+| sortItem | let
| No | ((a: MultiSelectItem, b: MultiSelectItem) => MultiSelectItem) | (() => void)
| (a, b) => a.text.localeCompare(b.text, locale, { numeric: true })
| Override the sorting logiclet
| No | (id: import("../ListBox/ListBoxMenuIcon.svelte").ListBoxMenuIconTranslationId) => string
| undefined
| Override the chevron icon label based on the open state.let
| No | (id: import("../ListBox/ListBoxSelection.svelte").ListBoxSelectionTranslationId) => string
| undefined
| Override the label of the clear button when the input has a selection.let
| No | string
| ""
| Specify the title text |
+| useTitleInItem | let
| No | boolean
| false
| Set to `true` to pass the item to `itemToString` in the checkbox |
+| invalid | let
| No | boolean
| false
| Set to `true` to indicate an invalid state |
+| invalidText | let
| No | string
| ""
| Specify the invalid state text |
+| warn | let
| No | boolean
| false
| Set to `true` to indicate an warning state |
+| warnText | let
| No | string
| ""
| Specify the warning state text |
+| helperText | let
| No | string
| ""
| Specify the helper text |
+| label | let
| No | string
| ""
| Specify the list box label |
+| hideLabel | let
| No | boolean
| false
| Set to `true` to visually hide the label text |
+| id | let
| No | string
| "ccs-" + Math.random().toString(36)
| Set an id for the list box component |
+| name | let
| No | string
| undefined
| Specify a name attribute for the select |
### Slots
diff --git a/docs/src/COMPONENT_API.json b/docs/src/COMPONENT_API.json
index fd4e5360..d6c41639 100644
--- a/docs/src/COMPONENT_API.json
+++ b/docs/src/COMPONENT_API.json
@@ -1563,7 +1563,7 @@
"reactive": false
},
{
- "name": "translateWithIdInput",
+ "name": "translateWithIdSelection",
"kind": "let",
"description": "Override the label of the clear button when the input has a selection.\nDefaults to \"Clear selected item\" since a combo box can only have on selection.",
"type": "(id: \"clearSelection\") => string",
@@ -6601,9 +6601,9 @@
"reactive": false
},
{
- "name": "translateWithIdInput",
+ "name": "translateWithIdSelection",
"kind": "let",
- "description": "Override the label of the clear button when the input has a selection.\nDefaults to \"Clear selected item\" and \"Clear all items\"",
+ "description": "Override the label of the clear button when the input has a selection.\nDefaults to \"Clear selected item\" and \"Clear all items\" if more than one item is selected",
"type": "(id: import(\"../ListBox/ListBoxSelection.svelte\").ListBoxSelectionTranslationId) => string",
"isFunction": false,
"isFunctionDeclaration": false,
diff --git a/types/ComboBox/ComboBox.svelte.d.ts b/types/ComboBox/ComboBox.svelte.d.ts
index d2e2fa4d..2dc3163a 100644
--- a/types/ComboBox/ComboBox.svelte.d.ts
+++ b/types/ComboBox/ComboBox.svelte.d.ts
@@ -126,7 +126,7 @@ export interface ComboBoxProps
* Defaults to "Clear selected item" since a combo box can only have on selection.
* @default undefined
*/
- translateWithIdInput?: (id: "clearSelection") => string;
+ translateWithIdSelection?: (id: "clearSelection") => string;
/**
* Set an id for the list box component
diff --git a/types/MultiSelect/MultiSelect.svelte.d.ts b/types/MultiSelect/MultiSelect.svelte.d.ts
index ca45f2ec..b56e330e 100644
--- a/types/MultiSelect/MultiSelect.svelte.d.ts
+++ b/types/MultiSelect/MultiSelect.svelte.d.ts
@@ -133,10 +133,10 @@ export interface MultiSelectProps
/**
* Override the label of the clear button when the input has a selection.
- * Defaults to "Clear selected item" and "Clear all items"
+ * Defaults to "Clear selected item" and "Clear all items" if more than one item is selected
* @default undefined
*/
- translateWithIdInput?: (
+ translateWithIdSelection?: (
id: import("../ListBox/ListBoxSelection.svelte").ListBoxSelectionTranslationId
) => string;