pub struct FieldProps {Show 22 fields
pub id: &'static str,
pub name: &'static str,
pub type: &'static str,
pub label: &'static str,
pub placeholder: &'static str,
pub helper_text: &'static str,
pub validation_state: ValidationState,
pub required: bool,
pub disabled: bool,
pub full_width: bool,
pub variant: Variant,
pub color: Color,
pub size: Size,
pub pattern: &'static str,
pub maxlength: Option<usize>,
pub minlength: Option<usize>,
pub class: &'static str,
pub style: &'static str,
pub handle: Signal<String>,
pub valid_handle: Signal<bool>,
pub validate_function: fn(String) -> bool,
pub data_testid: &'static str,
}Available on crate feature
dio only.Expand description
Props for the Field Dioxus component.
Fieldsยง
ยงid: &'static strยงname: &'static strยงtype: &'static strยงlabel: &'static strยงplaceholder: &'static strยงhelper_text: &'static strยงvalidation_state: ValidationStateยงrequired: boolยงdisabled: boolยงfull_width: boolยงvariant: Variantยงcolor: Colorยงsize: Sizeยงpattern: &'static strยงmaxlength: Option<usize>ยงminlength: Option<usize>ยงclass: &'static strยงstyle: &'static strยงhandle: Signal<String>ยงvalid_handle: Signal<bool>ยงvalidate_function: fn(String) -> boolยงdata_testid: &'static strImplementationsยง
Sourceยงimpl FieldProps
impl FieldProps
Sourcepub fn builder() -> FieldPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> FieldPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building FieldProps.
On the builder, call .id(...), .name(...)(optional), .r#type(...)(optional), .label(...)(optional), .placeholder(...)(optional), .helper_text(...)(optional), .validation_state(...)(optional), .required(...)(optional), .disabled(...)(optional), .full_width(...)(optional), .variant(...)(optional), .color(...)(optional), .size(...)(optional), .pattern(...)(optional), .maxlength(...)(optional), .minlength(...)(optional), .class(...)(optional), .style(...)(optional), .handle(...), .valid_handle(...), .validate_function(...), .data_testid(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of FieldProps.
Trait Implementationsยง
Sourceยงimpl Clone for FieldProps
impl Clone for FieldProps
Sourceยงimpl PartialEq for FieldProps
impl PartialEq for FieldProps
Sourceยงimpl Properties for FieldPropswhere
Self: Clone,
impl Properties for FieldPropswhere
Self: Clone,
Sourceยงtype Builder = FieldPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
type Builder = FieldPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
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 FieldProps
Auto Trait Implementationsยง
impl !RefUnwindSafe for FieldProps
impl !Send for FieldProps
impl !Sync for FieldProps
impl !UnwindSafe for FieldProps
impl Freeze for FieldProps
impl Unpin for FieldProps
impl UnsafeUnpin for FieldProps
Blanket Implementationsยง
impl<Token, Builder, How> AllPropsFor<Builder, How> for Tokenwhere
Builder: Buildable<Token>,
<Builder as Buildable<Token>>::WrappedToken: HasAllProps<<Builder as Buildable<Token>>::Output, How>,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Sourceยงimpl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DependencyElement for T
impl<T> HasAllProps<(), T> for T
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<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> โ
Converts
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> โ
Converts
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 moreSourceยงimpl<T> IntoPropValue<Option<T>> for T
impl<T> IntoPropValue<Option<T>> for T
Sourceยงfn into_prop_value(self) -> Option<T>
fn into_prop_value(self) -> Option<T>
Convert
self to a value of a Properties struct.Sourceยงimpl<T> IntoPropValue<T> for T
impl<T> IntoPropValue<T> for T
Sourceยงfn into_prop_value(self) -> T
fn into_prop_value(self) -> T
Convert
self to a value of a Properties struct.impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Sourceยงimpl<T> SerializableKey for T
impl<T> SerializableKey for T
Sourceยงimpl<Ret> SpawnIfAsync<(), Ret> for Ret
impl<Ret> SpawnIfAsync<(), Ret> for Ret
Sourceยงimpl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Sourceยงfn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Sourceยงfn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.
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.