This cell renders dropdown from react-select (opens in a new tab) package.
Note: Visibility of the dropdown is controlled by the isOpen
prop.
Implementation
- Open
DropdownCell
implementation on Github (opens in a new tab)
Interface declaration
type OptionType = {
label: string;
value: string;
};
interface DropdownCell extends Cell {
type: "dropdown";
selectedValue?: string;
values: OptionType[];
isDisabled?: boolean;
isOpen?: boolean;
inputValue?: string;
}
Property name | Type | Property description |
---|---|---|
type | dropdown | Type of cell template |
selectedValue | ?string | Currently selected option |
values? | OptionType[] | An array of options |
isDisabled? | ?boolean | Disables dropdown from opening |
isOpen? | ?boolean | Controls current state of open/close |
inputValue? | ?string | A value typed into a dropdown filter |