API REFERENCE · FORM CONTROLS
<dj-native-select>
A form-associated wrapper over a native <select>, driven by an options array, composing <dj-label>, <dj-helper-text>, and a <dj-icon> chevron. A blank option is prepended while nothing is selected. Parts: label, control, select, helper-text.
npm install @dojo-ng/native-select
import "@dojo-ng/native-select";
Properties
| Property | Attribute | Type | Default |
|---|---|---|---|
value |
value |
string |
"" |
name |
name reflected |
string |
None |
options |
options |
MenuOption[] |
[] |
label |
label |
string |
None |
helperText |
helper-text |
string |
None |
disabled |
disabled reflected |
boolean |
false |
required |
required reflected |
boolean |
false |
labelHidden |
label-hidden |
boolean |
false |
placeholder |
placeholder |
string |
None |
size |
size |
number |
None |
Events
change
CSS parts
Style these with dj-native-select::part(name).
labelcontrolselecthelper-textarrow
Methods
checkValidity(): booleanreportValidity(): booleanfocus(options: FocusOptions)
Types
The types that the properties above use, as they are declared in the source.
MenuOption
export interface MenuOption { value: string; label?: string; disabled?: boolean; }