Struct yew_bootstrap::component::form::FormControlProps
source · pub struct FormControlProps {Show 18 fields
pub ctype: FormControlType,
pub id: AttrValue,
pub class: Classes,
pub label: Option<AttrValue>,
pub placeholder: Option<AttrValue>,
pub help: Option<AttrValue>,
pub name: AttrValue,
pub value: AttrValue,
pub required: bool,
pub checked: bool,
pub disabled: bool,
pub floating: bool,
pub multiple: bool,
pub children: Children,
pub validation: FormControlValidation,
pub onchange: Callback<Event>,
pub oninput: Callback<InputEvent>,
pub onclick: Callback<MouseEvent>,
}Expand description
Fields§
§ctype: FormControlTypeType of control
id: AttrValueId for the form field
class: ClassesCSS class
label: Option<AttrValue>Optional label for the control
placeholder: Option<AttrValue>Optional placeholder, only used for text fields
help: Option<AttrValue>Optional help text
name: AttrValueName for the form field. For FormControlType::Radio, set same name to create a group
value: AttrValueValue as string, ignored for checkbox (Use checked instead). For a radio,
indicates the value in the group
required: boolIs this field required? Defaults to false.
checked: boolChecked or default value:
- For a checkbox, indicates the state (Checked or not)
- For a radio, indicates the default value (Only one in the group should have it)
disabled: boolDisabled if true
floating: boolIf true, label is floating inside the input. Ignored for checkbox/radio, date/time, color, range fields.
When true, label is required and placeholder is ignored.
multiple: boolMultiple select, only used for select form input
children: ChildrenChildren, only used for select form input
validation: FormControlValidationForm validation feedback Note: you must always validate user input server-side as well, this is only provided for better user experience
onchange: Callback<Event>Optional onchange event applied on the input For a text input, this is called when leaving the input field
oninput: Callback<InputEvent>Optional oninput event applied on the input, only for text inputs This is called each time an input is received, after each character
onclick: Callback<MouseEvent>Optional onclick event applied on the input
Trait Implementations§
source§impl Clone for FormControlProps
impl Clone for FormControlProps
source§fn clone(&self) -> FormControlProps
fn clone(&self) -> FormControlProps
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl PartialEq for FormControlProps
impl PartialEq for FormControlProps
source§fn eq(&self, other: &FormControlProps) -> bool
fn eq(&self, other: &FormControlProps) -> bool
self and other values to be equal, and is used
by ==.source§impl Properties for FormControlProps
impl Properties for FormControlProps
impl StructuralPartialEq for FormControlProps
Auto Trait Implementations§
impl !RefUnwindSafe for FormControlProps
impl !Send for FormControlProps
impl !Sync for FormControlProps
impl Unpin for FormControlProps
impl !UnwindSafe for FormControlProps
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§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>
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
self to a value of a Properties struct.