Select
This component is used to select an option from the list
Select component provides opportunity to choose one option from the list. It is similar to RadioList component, but has more features. It can provide search, grouping and clearable features.
Search
When your Select has a big number of options it is better to provide search field for selecting the right option. For that cases you have to set searchable
prop to true
. If you have complex values, most probably you have to set custom searchFunc
as well.
When user clicked on the select he immediately has a search field in which he enters a search query and he sees in the list only those elements that suit him.
Option Grouping
Like in basic HTML <select
> you can group your options into <optgroup>
, in Select you have similar functionality. Each Option in Select has optional parent
field. When all your options will be grouped into different groups by parent
field. Options with empty parent
field will be grouped into group "Other".
You can set human-readable title of the groups via parents
prop. This is an array of configurations for groups of options. Also you can disable entire group.
OptionParent
Properties <T>
|
| Selected option |
| List of the options | |
|
| Callback is called when user selects an option |
| List of groups of the options | |
|
| If |
|
| If |
|
| Custom search function (when |
|
| Custom Select option component |
| Size of the Select | |
|
| Error message |
|
| Hint text |
| Surface of the Select | |
| Elevation of the Select | |
|
| Custom CSS class |
History
Altrone 2.0
:added
surface
propadded
elevation
prop
Altrone 1.2
:added
clearable
prop
Altrone 1.0
: initial release
Last updated