Form Select
출처: 문서
본문
Examples
Basic
Select oneMrMissMrsMsDrOther
Validated
Selection:
Select a numberOneTwoThree - the only valid option
Disabled
Select oneMrMissMrsMsDrOther
Grouped
The first optionSecond option is selected by defaultThe third optionThe fourth optionThe fifth optionThe sixth option
Props
FormSelect
required | | Name | Type | Default | Description | childrenrequired | React.ReactNode | | content rendered inside the FormSelect
| aria-label | string | | Custom flag to show that the FormSelect requires an associated id or aria-label.
| className | string | '' | additional classes added to the FormSelect control
| isDisabled | boolean | false | Flag indicating the FormSelect is disabled
| isRequired | boolean | false | Sets the FormSelect required.
| onBlur | (event: React.FormEvent) => void | (): any => undefined | Optional callback for updating when selection loses focus
| onChange | (event: React.FormEvent, value: string) => void | (): any => undefined | Optional callback for updating when selection changes
| onFocus | (event: React.FormEvent) => void | (): any => undefined | Optional callback for updating when selection gets focus
| ouiaId | number | string | | Value to overwrite the randomly generated data-ouia-component-id.
| ouiaSafe | boolean | true | Set the value of data-ouia-safe. Only set to true when the component is in a static state, i.e. no animations are occurring. At all other times, this value must be false.
| validated | 'success' | 'warning' | 'error' | 'default' | 'default' | Value to indicate if the select is modified to show that validation state. If set to success, select will be modified to indicate valid state. If set to error, select will be modified to indicate error state.
| value | any | '' | value of selected option
FormSelectOption
required | | Name | Type | Default | Description | labelrequired | string | | the label for the option
| className | string | '' | additional classes added to the Select Option
| isDisabled | boolean | false | flag indicating if the option is disabled
| isPlaceholder | boolean | false | flag indicating if option will have placeholder styling applied when selected *
| value | any | '' | the value for the option
FormSelectOptionGroup
required | | Name | Type | Default | Description | labelrequired | string | | the label for the option
| children | React.ReactNode | null | content rendered inside the Select Option Group
| className | string | '' | additional classes added to the Select Option
| isDisabled | boolean | false | flag indicating if the Option Group is disabled