Select
A custom select component that supports searching with multi select
Installation
npm install --save @gladio/select
Usage
import Select from "@gladio/select"function App () {return <Select value={null} options={["Apple", "Orange", "Mango"]} />}
The select component provides a convenient and easy way to render a custom select with search and multi select functionality. The component also allows the async fetch for options to filter out the list.
Props
onChange
Listen to onChange of the selected value. This work in the similar way as the native select works.
type onChange = (value: null | string | object, name: string) => void
Custom option renderer
We can pass optionRenderer to the select component to render a custom component for options in the menu
Code Editor
Playground
Code Editor