pub struct EuvSelectProps {
pub value: Signal<String>,
pub options: Vec<EuvSelectOption>,
pub placeholder: &'static str,
pub label: &'static str,
pub disabled: bool,
pub on_change: Option<Rc<dyn Fn(&'static str)>>,
}Expand description
Props for the euv_select component.
The selection lives in a caller-owned Signal<String> so the select
takes part in two-way binding with the rest of the page. The open state
of the option panel is owned by the component itself, so the caller
never has to wire it up.
Fields§
§value: Signal<String>The signal holding the currently selected option value.
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.
disabled: boolWhether the whole control is disabled.
on_change: Option<Rc<dyn Fn(&'static str)>>Optional callback receiving the value of the picked option.
Trait Implementations§
Source§impl Clone for EuvSelectProps
impl Clone for EuvSelectProps
Source§impl Debug for EuvSelectProps
impl Debug for EuvSelectProps
Auto Trait Implementations§
impl !RefUnwindSafe for EuvSelectProps
impl !Send for EuvSelectProps
impl !Sync for EuvSelectProps
impl !UnwindSafe for EuvSelectProps
impl Freeze for EuvSelectProps
impl Unpin for EuvSelectProps
impl UnsafeUnpin for EuvSelectProps
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more