Skip to main content

EuvSelectProps

Struct EuvSelectProps 

Source
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: bool

Whether the Select permits more than one selected option.

§values: Signal<Vec<String>>

The selected option values used when multiple is enabled.

§size: EuvSelectSize

The size of the trigger.

§options: Vec<EuvSelectOption>

The options rendered in the panel, in display order.

§placeholder: &'static str

The text shown in the trigger while no option is selected.

§label: &'static str

The group label above the trigger; an empty label renders no label.

§aria_label: String

Accessible name for the trigger when no visible label is rendered.

§aria_describedby: &'static str

Space-separated ids for the trigger’s descriptive text and error.

§id: &'static str

The trigger id used to connect an external label to the control. An empty id uses the generated Select id.

§name: &'static str

The form field name submitted by the hidden native control.

§form: &'static str

The id of the form that owns the hidden native control. An empty value uses the nearest ancestor form.

§auto_complete: &'static str

The browser autofill hint applied to the single-value native control. An empty value leaves the browser’s default behavior enabled.

§required: bool

Whether the native form control is required.

§invalid: bool

Whether the control is invalid; the root and trigger expose that state for field styling and assistive technology.

§disabled: bool

Whether the whole control is disabled.

§read_only: bool

Whether 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: bool

The initial open state used when open is not provided.

§align_item_with_trigger: bool

Whether 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

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for EuvSelectProps

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the struct fields as a debug struct, skipping excluded fields.

§Arguments
  • &mut std::fmt::Formatter<'_> - The formatter to write the representation into.
§Returns
  • std::fmt::Result - Success or failure of the formatting operation.
Source§

impl Default for EuvSelectProps

Implementation of default props for Select.

Source§

fn default() -> Self

Constructs a default EuvSelectProps value.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<S, T> Upcast<T> for S
where T: UpcastFrom<S> + ?Sized, S: ?Sized,

Source§

fn upcast(&self) -> &T
where Self: ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider ref type within the Wasm bindgen generics type system. Read more
Source§

fn upcast_into(self) -> T
where Self: Sized + ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider type within the Wasm bindgen generics type system. Read more