SelectProps <T, V>
Hierarchy
- PromptProps<T>
- ScrollableListProps
- SelectProps
Index
Properties
optionaldefaultSelected
label
Label to display before or above the prompt itself.
optionallimit
Number of options to display before scrolling. Defaults to console height.
onSubmit
Callback triggered when the value is submitted.
options
List of options to choose from. Can either be a string, number, or object with a label
and value
.
optionaloverflowAfterLabel
Label to display above scrollable options with the number of overflowing options.
optionaloverflowBeforeLabel
Label to display below scrollable options with the number of overflowing options.
optionalprefix
Single character symbol to display before the label. Defaults to "?"".
optionalscrollType
The pattern in which to limit options when scrolling. Defaults to overflow
.
cycle
- Will continously cycle through options, even when navigating to and past edges.overflow
- Will display options bound to an edge, with the number of options hidden above and below.
optionalvalidate
Function to validate the value on submit. To trigger a failed state, thrown an Error
.
Option value selected by default.