feat(multi-select): add itemToInput to allow customizing name/title/labelText

This commit is contained in:
Eric Liu 2022-02-10 07:11:15 -08:00
commit 0f7349eff5
4 changed files with 53 additions and 50 deletions

View file

@ -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