pub struct EuvNumberInputProps {
pub value: Signal<i64>,
pub min: Option<i64>,
pub max: Option<i64>,
pub step: i64,
pub label: &'static str,
pub disabled: bool,
pub on_change: Option<Rc<dyn Fn(i64)>>,
}Expand description
Props for the euv_number_input component.
The value lives in a caller-owned Signal so the field takes part in
two-way binding: the steppers and the typed text both write back into it,
and the caller may write into it from the outside.
Fields§
§value: Signal<i64>The current value of the field.
min: Option<i64>The inclusive lower bound.
None leaves the value unbounded below.
max: Option<i64>The inclusive upper bound.
None leaves the value unbounded above.
step: i64The step size used by the two stepper buttons.
A step of 0 would never move the value, so it is treated as 1.
label: &'static strThe label rendered above the field.
An empty string renders the field without a label.
disabled: boolWhether the field and its steppers are inert.
on_change: Option<Rc<dyn Fn(i64)>>The callback invoked with the new value after every change.
It fires for stepper clicks and for typed text alike.
Trait Implementations§
Source§impl Clone for EuvNumberInputProps
impl Clone for EuvNumberInputProps
Source§impl Debug for EuvNumberInputProps
impl Debug for EuvNumberInputProps
Auto Trait Implementations§
impl !RefUnwindSafe for EuvNumberInputProps
impl !Send for EuvNumberInputProps
impl !Sync for EuvNumberInputProps
impl !UnwindSafe for EuvNumberInputProps
impl Freeze for EuvNumberInputProps
impl Unpin for EuvNumberInputProps
impl UnsafeUnpin for EuvNumberInputProps
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