pub struct NumberInputProps {
pub value: f64,
pub on_change: EventHandler<f64>,
pub min: Option<f64>,
pub max: Option<f64>,
pub step: f64,
pub precision: Option<usize>,
pub placeholder: Option<String>,
pub disabled: bool,
pub label: Option<String>,
pub error: Option<String>,
pub style: Option<String>,
pub class: Option<String>,
}Expand description
Number input properties
Fields§
§value: f64Current value
on_change: EventHandler<f64>Callback when value changes
min: Option<f64>Minimum value
max: Option<f64>Maximum value
step: f64Step increment
precision: Option<usize>Decimal precision
placeholder: Option<String>Placeholder text
disabled: boolDisabled state
label: Option<String>Label text
error: Option<String>Error message
style: Option<String>Custom inline styles
class: Option<String>Custom class name
Implementations§
Source§impl NumberInputProps
impl NumberInputProps
Sourcepub fn builder() -> NumberInputPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> NumberInputPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building NumberInputProps.
On the builder, call .value(...)(optional), .on_change(...), .min(...)(optional), .max(...)(optional), .step(...)(optional), .precision(...)(optional), .placeholder(...)(optional), .disabled(...)(optional), .label(...)(optional), .error(...)(optional), .style(...)(optional), .class(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of NumberInputProps.
Trait Implementations§
Source§impl Clone for NumberInputProps
impl Clone for NumberInputProps
Source§fn clone(&self) -> NumberInputProps
fn clone(&self) -> NumberInputProps
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl PartialEq for NumberInputProps
impl PartialEq for NumberInputProps
Source§impl Properties for NumberInputPropswhere
Self: Clone,
impl Properties for NumberInputPropswhere
Self: Clone,
Source§type Builder = NumberInputPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), ())>
type Builder = NumberInputPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), ())>
The type of the builder for this component.
Used to create “in-progress” versions of the props.
Source§fn memoize(&mut self, new: &Self) -> bool
fn memoize(&mut self, new: &Self) -> bool
Make the old props equal to the new props. Return if the props were equal and should be memoized.
Source§fn into_vcomponent<M>(
self,
render_fn: impl ComponentFunction<Self, M>,
) -> VComponentwhere
M: 'static,
fn into_vcomponent<M>(
self,
render_fn: impl ComponentFunction<Self, M>,
) -> VComponentwhere
M: 'static,
Create a component from the props.
impl StructuralPartialEq for NumberInputProps
Auto Trait Implementations§
impl Freeze for NumberInputProps
impl !RefUnwindSafe for NumberInputProps
impl !Send for NumberInputProps
impl !Sync for NumberInputProps
impl Unpin for NumberInputProps
impl UnsafeUnpin for NumberInputProps
impl !UnwindSafe for NumberInputProps
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
Source§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Create an instance of this type from an initialization function
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<Ret> SpawnIfAsync<(), Ret> for Ret
impl<Ret> SpawnIfAsync<(), Ret> for Ret
Source§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
Source§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
Source§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
Source§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.