pub struct Input {
pub common: Common,
pub value: Option<String>,
pub placeholder: Option<String>,
pub label: Option<Line>,
pub multiline: Option<bool>,
pub rows: Option<u16>,
pub secret: Option<bool>,
pub max_length: Option<u32>,
pub disabled: Option<bool>,
pub on_submit: Option<ActionId>,
pub on_change: Option<ActionId>,
}Expand description
A text field (§4.5.2). Typed text is local state; values collects it on
submission (§4.6).
Fields§
§common: CommonCommon node props (key is required for Input).
value: Option<String>Initial value (also drives the field when it changes).
placeholder: Option<String>Placeholder.
label: Option<Line>Field label.
multiline: Option<bool>Multi-line (default false; intrinsic height rows, default 3).
rows: Option<u16>Rows when multiline.
secret: Option<bool>Mask the text.
max_length: Option<u32>Maximum length.
disabled: Option<bool>Greyed out.
on_submit: Option<ActionId>Action on Enter (the string value).
on_change: Option<ActionId>Action on change, debounced 150 ms (the string value).
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Input
impl<'de> Deserialize<'de> for Input
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Input
Source§impl WithCommon for Input
impl WithCommon for Input
Source§fn common_mut(&mut self) -> &mut Common
fn common_mut(&mut self) -> &mut Common
Mutable access to the node’s common props.
Source§fn block(self, block: impl Into<BlockProps>) -> Self
fn block(self, block: impl Into<BlockProps>) -> Self
Sets the surrounding block.
Auto Trait Implementations§
impl Freeze for Input
impl RefUnwindSafe for Input
impl Send for Input
impl Sync for Input
impl Unpin for Input
impl UnsafeUnpin for Input
impl UnwindSafe for Input
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