@brighthr/component-listtypeahead
v4.0.1
Published
To install, type the following into the command line at the root of your project:
Downloads
1,277
Readme
ListTypeahead
To install, type the following into the command line at the root of your project:
npm i @brighthr/component-listtypeahead
To implement the ListTypeahead component into your project you’ll need to add the import:
import ListTypeahead from '@brighthr/component-listtypeahead';
After adding import into your project you can use it simply like:
<ListTypeahead />
Props
| Name | Type | Default | Description |
|------------------|-----------------------------------|----------------------|---------------------------------------------------|
| disabled | boolean
| | If true
, disables the ListTypeahead |
| hasError | boolean
| | If true
, shows a red error theme. |
| id | | | |
| isMultiSelect | boolean
| false
| If true
, |
| name | string
| | Sets a html id
the input. |
| options | [{ id: string, label: string }]
| | Defines the options to appear in the type ahead. |
| placeholder | string
| 'Search or select'
| Sets the placeholder. |
| selectedItems | [{ id: string, label: string }]
| | Sets the items that are currently selected. |
| setSelectedItems | (value: option[]) => void
| | Function for handling setting the selected items. |