pub struct ModelForm<T>{
pub model: Computed<T>,
pub on_submit: Rc<dyn Fn(T)>,
pub params: FormParams<T>,
}Expand description
Renders a form for provided model, that upon “Save” allows to update a model with new values.
A model needs to implement conversion to FormData and from FormExport to interoperate with this component.
See FormData for description how to manage form structure.
Use f attribute group to pass anything to underlying
Fields§
§model: Computed<T>§on_submit: Rc<dyn Fn(T)>§params: FormParams<T>Implementations§
Source§impl<T> ModelForm<T>
impl<T> ModelForm<T>
pub fn into_component(self) -> __ModelFormComponent<T>
Auto Trait Implementations§
impl<T> Freeze for ModelForm<T>
impl<T> !RefUnwindSafe for ModelForm<T>
impl<T> !Send for ModelForm<T>
impl<T> !Sync for ModelForm<T>
impl<T> Unpin for ModelForm<T>
impl<T> !UnwindSafe for ModelForm<T>
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> 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 more