gov-form-select
Properties
| Property | Attribute | Description | Type | Default |
|---|---|---|---|---|
disabled | disabled | Makes the select component disabled. This prevents users from being able to interact with the select, and conveys its inactive state to assistive technologies. | boolean | false |
identifier | identifier | Custom select identifier. | string | undefined |
invalid | invalid | Indicates the entered value does not conform to the format expected by the application. | boolean | undefined |
name | name | Name of the select. | string | undefined |
options | options | Options of select | FormSelectOption[] | string | undefined |
required | required | Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them. When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors. | boolean | false |
size | size | Select’s size. | "l" | "m" | "s" | "xl" | "xs" | 'm' |
success | success | Indicates the entered value of child form element does conform to the format expected by the application. | boolean | undefined |
value | value | Value of select | string | undefined |
Events
| Event | Description | Type |
|---|---|---|
gov-blur | Emitted when the select loses focus. | CustomEvent<FormSelectEvent> |
gov-change | Emitted when the select change value. | CustomEvent<FormSelectEvent> |
gov-focus | Emitted when the select has focus. | CustomEvent<FormSelectEvent> |
Methods
getRef() => Promise<HTMLSelectElement>
Returns an instance of the native html select element
Returns
Type: Promise<HTMLSelectElement>
setFocus(options?: FocusOptions) => Promise<void>
Returns the current state of the component
Parameters
| Name | Type | Description |
|---|---|---|
options | FocusOptions |
Returns
Type: Promise<void>
Dependencies
Used by
Depends on
Graph
Built with StencilJS