pub struct EuvNativeSelectProps {
pub size: EuvNativeSelectSize,
pub id: &'static str,
pub name: &'static str,
pub aria_label: String,
pub disabled: bool,
pub required: bool,
pub invalid: bool,
pub value: Signal<String>,
pub onchange: Option<Rc<dyn Fn(Event)>>,
}Expand description
Props for the euv_native_select component.
The select carries the size of the control and the state a form needs to read back. The options themselves are passed as children.
Fields§
§size: EuvNativeSelectSizeThe size of the control.
id: &'static strThe identifier used to connect an external label to the control.
An empty identifier is generated by the component.
name: &'static strThe form name the control submits under.
aria_label: StringAccessible name for the native select.
disabled: boolWhether the control refuses input.
required: boolWhether the native control is required by its form.
invalid: boolWhether the control is invalid and should expose its error state.
value: Signal<String>The value the control currently shows.
An empty value leaves the control to the choice of the browser, and the first option is the one it shows. A value the options do not carry leaves the control as it is.
onchange: Option<Rc<dyn Fn(Event)>>The callback that receives the value the reader chose.
The control is the native one, so the change arrives as an event on the control itself and the value is read from it.