UNPKG

flexiselect-js

Version:

Advanced TomSelect wrapper with groups, checkboxes, images

28 lines (27 loc) 737 B
import type TomSelect from "tom-select"; export interface FlexiSelectOption { value: string; text: string; label?: string; group?: string; image?: string; [key: string]: any; } export interface FlexiSelectOptGroup { value: string; label: string; } export interface FlexiSelectOptions { placeholder?: string; allowAdd?: boolean; multiple?: boolean; showRemoveButton?: boolean; clearAll?: boolean; showCheckboxes?: boolean; groupSelectable?: boolean; options?: FlexiSelectOption[]; optgroups?: FlexiSelectOptGroup[]; render?: Partial<TomSelect["settings"]["render"]>; onInitialize?: (this: TomSelect) => void; onChange?: (value: string | string[]) => void; }