mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-22 05:03:44 +00:00
feat(multi-select): add itemToInput to allow customizing name/title/labelText
This commit is contained in:
parent
c42aea86fa
commit
0f7349eff5
4 changed files with 53 additions and 50 deletions
11
types/MultiSelect/MultiSelect.svelte.d.ts
vendored
11
types/MultiSelect/MultiSelect.svelte.d.ts
vendored
|
@ -25,11 +25,14 @@ export interface MultiSelectProps
|
|||
itemToString?: (item: MultiSelectItem) => any;
|
||||
|
||||
/**
|
||||
* Override the input name attribute of a multiselect item.
|
||||
* Defaults to using the item id
|
||||
* @default (item) => item.id
|
||||
* Override the item name, title, labelText passed to the checkbox input
|
||||
* @default (item) => {}
|
||||
*/
|
||||
itemToName?: (item: MultiSelectItem) => any;
|
||||
itemToInput?: (item: MultiSelectItem) => {
|
||||
name?: string;
|
||||
labelText?: any;
|
||||
title?: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Set the selected ids
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue