pub struct EuvSelectProps {Show 23 fields
pub value: Signal<String>,
pub multiple: bool,
pub values: Signal<Vec<String>>,
pub size: EuvSelectSize,
pub options: Vec<EuvSelectOption>,
pub placeholder: &'static str,
pub label: &'static str,
pub aria_label: String,
pub aria_describedby: &'static str,
pub id: &'static str,
pub name: &'static str,
pub form: &'static str,
pub auto_complete: &'static str,
pub required: bool,
pub invalid: bool,
pub disabled: bool,
pub read_only: bool,
pub open: Option<Signal<bool>>,
pub default_open: bool,
pub align_item_with_trigger: bool,
pub on_change: Option<Rc<dyn Fn(&'static str)>>,
pub on_change_values: Option<Rc<dyn Fn(Vec<String>)>>,
pub on_open_change: Option<Rc<dyn Fn(bool)>>,
}Expand description
Props for the euv_select component.
The selection lives in caller-owned signals: value for single mode and
values when multiple is enabled. The panel open state is component-owned.
Fields§
§value: Signal<String>The signal holding the currently selected option value.
multiple: boolWhether the Select permits more than one selected option.
values: Signal<Vec<String>>The selected option values used when multiple is enabled.
size: EuvSelectSizeThe size of the trigger.
options: Vec<EuvSelectOption>The options rendered in the panel, in display order.
placeholder: &'static strThe text shown in the trigger while no option is selected.
label: &'static strThe group label above the trigger; an empty label renders no label.
aria_label: StringAccessible name for the trigger when no visible label is rendered.
aria_describedby: &'static strSpace-separated ids for the trigger’s descriptive text and error.
id: &'static strThe trigger id used to connect an external label to the control. An empty id uses the generated Select id.
name: &'static strThe form field name submitted by the hidden native control.
form: &'static strThe id of the form that owns the hidden native control. An empty value uses the nearest ancestor form.
auto_complete: &'static strThe browser autofill hint applied to the single-value native control. An empty value leaves the browser’s default behavior enabled.
required: boolWhether the native form control is required.
invalid: boolWhether the control is invalid; the root and trigger expose that state for field styling and assistive technology.
disabled: boolWhether the whole control is disabled.
read_only: boolWhether the user can inspect options without changing the value.
open: Option<Signal<bool>>The caller-owned open signal; None leaves open state uncontrolled.
default_open: boolThe initial open state used when open is not provided.
align_item_with_trigger: boolWhether the selected item aligns with the trigger while the panel is open.
Defaults to true with the shadcn scheme and false with other schemes.
on_change: Option<Rc<dyn Fn(&'static str)>>Optional callback receiving the value of the picked option.
on_change_values: Option<Rc<dyn Fn(Vec<String>)>>Optional callback receiving the full multiple-selection value list.
on_open_change: Option<Rc<dyn Fn(bool)>>Optional callback invoked when the Select requests an open-state change.
Trait Implementations§
Source§impl Clone for EuvSelectProps
impl Clone for EuvSelectProps
Source§impl Debug for EuvSelectProps
impl Debug for EuvSelectProps
Source§impl Default for EuvSelectProps
Implementation of default props for Select.
impl Default for EuvSelectProps
Implementation of default props for Select.
Source§fn default() -> Self
fn default() -> Self
Constructs a default EuvSelectProps value.