pub struct NumberFieldProps {
pub value: Option<String>,
pub default_value: Option<String>,
pub min: Option<String>,
pub max: Option<String>,
pub step: Option<String>,
pub type: String,
pub on_value_change: Option<EventHandler<String>>,
pub oninput: Option<EventHandler<FormEvent>>,
pub onchange: Option<EventHandler<FormEvent>>,
pub class: Option<String>,
pub attributes: Vec<Attribute>,
}Expand description
Props for NumberField.
Fields§
§value: Option<String>Controlled value. Leave unset to let the input manage itself.
default_value: Option<String>Initial value when uncontrolled.
min: Option<String>Inclusive lower bound, a complete ASCII decimal such as "0".
max: Option<String>Inclusive upper bound.
step: Option<String>Step size for the arrow keys. Defaults to 1.
type: StringThe native input type. Defaults to number.
on_value_change: Option<EventHandler<String>>Called with the input’s text after every edit or step.
oninput: Option<EventHandler<FormEvent>>Fires on every edit.
onchange: Option<EventHandler<FormEvent>>Fires when the value is committed.
class: Option<String>Extra classes appended after the Lumen classes.
attributes: Vec<Attribute>Any other <input> or global attribute, such as id, name, or aria_label.
Implementations§
Source§impl NumberFieldProps
impl NumberFieldProps
Sourcepub fn builder() -> NumberFieldPropsBuilder<((), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> NumberFieldPropsBuilder<((), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building NumberFieldProps.
On the builder, call .value(...)(optional), .default_value(...)(optional), .min(...)(optional), .max(...)(optional), .step(...)(optional), .r#type(...)(optional), .on_value_change(...)(optional), .oninput(...)(optional), .onchange(...)(optional), .class(...)(optional), .attributes(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of NumberFieldProps.
Trait Implementations§
Source§impl Clone for NumberFieldProps
impl Clone for NumberFieldProps
Source§impl PartialEq for NumberFieldProps
impl PartialEq for NumberFieldProps
Source§impl Properties for NumberFieldPropswhere
Self: Clone,
impl Properties for NumberFieldPropswhere
Self: Clone,
Source§type Builder = NumberFieldPropsBuilder<((), (), (), (), (), (), (), (), (), (), ())>
type Builder = NumberFieldPropsBuilder<((), (), (), (), (), (), (), (), (), (), ())>
Source§fn memoize(&mut self, new: &Self) -> bool
fn memoize(&mut self, new: &Self) -> bool
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,
impl StructuralPartialEq for NumberFieldProps
Auto Trait Implementations§
impl !RefUnwindSafe for NumberFieldProps
impl !Send for NumberFieldProps
impl !Sync for NumberFieldProps
impl !UnwindSafe for NumberFieldProps
impl Forget for NumberFieldProps
impl Freeze for NumberFieldPropswhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
&'static UnsyncStorage: Freeze,
NonZero<u64>: Freeze,
&'static Location<'static>: Freeze,
PhantomData<Option<ExternalListenerCallback<String, ()>>>: Freeze,
PhantomData<Option<ExternalListenerCallback<Event<FormData>, ()>>>: Freeze,
PhantomData<Attribute>: Freeze,
impl Move for NumberFieldProps
impl Unpin for NumberFieldPropswhere
*const u8 is !null: Unpin,
&'static UnsyncStorage: Unpin,
NonZero<u64>: Unpin,
&'static Location<'static>: Unpin,
Box<dyn FnMut(String)>: Unpin,
*const RcInner<Runtime> is !null: Unpin,
Box<dyn FnMut(Event<FormData>)>: Unpin,
&'static str: Unpin,
Rc<RefCell<dyn FnMut(Event<dyn Any>)>>: Unpin,
Rc<dyn AnyValue>: Unpin,
impl UnsafeUnpin for NumberFieldPropswhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
&'static UnsyncStorage: UnsafeUnpin,
NonZeroU64Inner: UnsafeUnpin,
&'static Location<'static>: UnsafeUnpin,
PhantomData<Option<ExternalListenerCallback<String, ()>>>: UnsafeUnpin,
PhantomData<Option<ExternalListenerCallback<Event<FormData>, ()>>>: UnsafeUnpin,
PhantomData<Attribute>: UnsafeUnpin,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DependencyElement for T
impl<T> ErasedDestructor for Twhere
T: 'static,
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
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more