Allows the user to search and make multi selection from a list of values.
const [selectedOptions, setSelectedOptions] = React.useState();
return (
<Stack gap="large">
<MultiSelect
options={[
{
label: '',
options: [
{ value: 'SENT', label: 'Sent' },
{ value: 'COMPLETED', label: 'Completed' },
],
},
]}
/>
</Stack>
);
const [selectedOptions, setSelectedOptions] = React.useState();
return (
<Stack gap="large">
<MultiSelect
options={[
{
label: 'Status',
options: [
{ value: 'SENT', label: 'Sent' },
{ value: 'COMPLETED', label: 'Completed' },
],
},
{
label: 'Payment',
options: [
{ value: 'CASH', label: 'Cash' },
{ value: 'CARD', label: 'Card' },
],
},
]}
placeholder="Select type"
onChange={selected => setSelectedOptions(selected)}
defaultOptions={[
{ value: 'CASH', label: 'Cash' },
{ value: 'SENT', label: 'Sent' },
]}
/>
</Stack>
);