Select allows users to choose one option from a prescribed list.
fullWidth
FormControlLabel
appendToBody
menuStyle={{maxHeight: 'none'}}
selectedItem={this.state.selectedValue}
selectedItem={this.state.selectedItem}
Property | Type | Required | Default | Description |
---|---|---|---|---|
placeholder | String | false | Select... | Placeholder text for the input. |
placement | Enum | false | bottom-start | Specify where the menu should appear in relation to the Select element. |
virtualizedRowHeight | Union | false | 42 | (virtualized only) Row height used to calculate how many rows to render in a virtualized menu. |
onChange | Func | false | () => {} | Callback function fired when the value of the Select changes. |
children | Node | false | - | Nodes to be used as options in the Select. |
filterable | Bool | false | - | Toggle the Select to use an input and allow filtering of the items. |
autoSelect | Bool | false | - | The highlighted item will be automatically selected on blur. |
virtualized | Bool | false | - | Use react-virtualized to render rows as the user scrolls. |
selectedItem | Node | false | - | The selected item of the Select. |
selectedValue | Any | false | - | Value of the selected item. |
renderValue | Func | false | - | Function to run when determining how to display selected values in a collapsed Select. |
fullWidth | Bool | false | - | Whether or not the Select will fill its container's width. |
minimal | Bool | false | - | A style variant for Select inputs. |
id | String | false | - | HTML prop for the Select; works together with a label's `for` prop. |
menuStyle | Object | false | - | Style prop applied to the menu wrapper. |
positionFixed | Bool | false | - | Uses `position: fixed` on the tooltip, allowing it to show up outside of containers that have `overflow: hidden`. |
virtualizedMenuWidth | Number | false | - | (virtualized only) Width of the menu; unloaded rows may be wider than the initial set. |
popperModifiers | Object | false | - | Modifiers to be passed to the Popper element |
For keyboard interaction, Select menus can be opened and selected from using the
Spacebar
or the Enter
keys. The Enter
key does not trigger form submission
when a Select is in focus. When using a filterable
Select, the menu can be
opened with the Down Arrow
key. A Select can be closed without altering its
value with the Escape
key.