pub struct AmountFieldProps {Show 16 fields
pub value: Option<String>,
pub default_value: String,
pub locale: String,
pub fraction_digits: u8,
pub allow_negative: bool,
pub min: Option<String>,
pub max: Option<String>,
pub invalid_message: Option<String>,
pub range_underflow_message: Option<String>,
pub range_overflow_message: Option<String>,
pub on_value_change: Option<EventHandler<AmountFieldChange>>,
pub name: Option<String>,
pub form: Option<String>,
pub disabled: bool,
pub class: Option<String>,
pub attributes: Vec<Attribute>,
}Expand description
Props for AmountField.
Fields§
§value: Option<String>Controlled ASCII draft, such as "1234.50". Leave unset to let the field manage itself.
default_value: StringInitial ASCII draft when uncontrolled. Defaults to empty.
locale: StringBCP 47 locale of the displayed separators and digits. Defaults to en-US.
fraction_digits: u8Allowed fraction digits, from 0 to 20. Defaults to 2; larger values count as 20.
allow_negative: boolAccepts negative amounts.
min: Option<String>Inclusive lower bound as a complete ASCII decimal string such as "1000.50".
max: Option<String>Inclusive upper bound as a complete ASCII decimal string.
invalid_message: Option<String>Message for an incomplete or invalid amount.
range_underflow_message: Option<String>Underflow message; {min} is replaced with the formatted bound.
range_overflow_message: Option<String>Overflow message; {max} is replaced with the formatted bound.
on_value_change: Option<EventHandler<AmountFieldChange>>Called after every accepted edit with the draft and its complete value.
name: Option<String>Form field name of the hidden input that submits the ASCII value.
form: Option<String>Id of the form both inputs belong to.
disabled: boolDisables the field; a disabled amount is not submitted.
class: Option<String>Extra classes for the visible input, appended after the Lumen classes.
attributes: Vec<Attribute>Any other <input> or global attribute for the visible input, such as aria_label, id,
readonly (which also ignores edits), or required (which the hidden input mirrors).
Implementations§
Source§impl AmountFieldProps
impl AmountFieldProps
Sourcepub fn builder() -> AmountFieldPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> AmountFieldPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building AmountFieldProps.
On the builder, call .value(...)(optional), .default_value(...)(optional), .locale(...)(optional), .fraction_digits(...)(optional), .allow_negative(...)(optional), .min(...)(optional), .max(...)(optional), .invalid_message(...)(optional), .range_underflow_message(...)(optional), .range_overflow_message(...)(optional), .on_value_change(...)(optional), .name(...)(optional), .form(...)(optional), .disabled(...)(optional), .class(...)(optional), .attributes(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of AmountFieldProps.
Trait Implementations§
Source§impl Clone for AmountFieldProps
impl Clone for AmountFieldProps
Source§impl PartialEq for AmountFieldProps
impl PartialEq for AmountFieldProps
Source§impl Properties for AmountFieldPropswhere
Self: Clone,
impl Properties for AmountFieldPropswhere
Self: Clone,
Source§type Builder = AmountFieldPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
type Builder = AmountFieldPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
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 AmountFieldProps
Auto Trait Implementations§
impl !RefUnwindSafe for AmountFieldProps
impl !Send for AmountFieldProps
impl !Sync for AmountFieldProps
impl !UnwindSafe for AmountFieldProps
impl Forget for AmountFieldProps
impl Freeze for AmountFieldPropswhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
&'static UnsyncStorage: Freeze,
NonZero<u64>: Freeze,
&'static Location<'static>: Freeze,
PhantomData<Option<ExternalListenerCallback<AmountFieldChange, ()>>>: Freeze,
PhantomData<Attribute>: Freeze,
impl Move for AmountFieldProps
impl Unpin for AmountFieldProps
impl UnsafeUnpin for AmountFieldPropswhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
&'static UnsyncStorage: UnsafeUnpin,
NonZeroU64Inner: UnsafeUnpin,
&'static Location<'static>: UnsafeUnpin,
PhantomData<Option<ExternalListenerCallback<AmountFieldChange, ()>>>: 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