SelectField
A standard component to let a user pick one of the provided options.
Properties
Determines whether it’s a caret icon or a text saying ‘Select’ on the right
Whether users needs to confirm their selection
If presents shows the message under the select and makes the border and label change color to red
Prop passed through directly to the modal’s FlatList. If not provided, labelExtractor is used.
Label
Function that takes in an option item and returns a label displayed in the list
Modal subtitle
Modal title
Regular input onChange handler
Callback fired when the close icon is pressed
Data representing the options
An element to render before each option in the options list
Function that takes in an the selected item and returns a string displayed as the selected value If not providerd, labelExtractor is used.
Selected value
Function that takes in an option item and returns a value that’s later passed to onChange
Basic usage
Compact
Uses a caret icon instead of a 'Select' link to open the modal
Compact with a custom selectionExtractor
The selected value is displayed differently than shown on the list initially.