pub struct TextInputProps<'a, A> {
pub value: &'a str,
pub placeholder: &'a str,
pub is_focused: bool,
pub style: TextInputStyle,
pub on_change: fn(String) -> A,
pub on_submit: fn(String) -> A,
pub on_cursor_move: Option<fn(usize) -> A>,
}Expand description
Props for TextInput component
Fields§
§value: &'a strCurrent input value
placeholder: &'a strPlaceholder text when empty
is_focused: boolWhether this component has focus
style: TextInputStyleUnified styling
on_change: fn(String) -> ACallback when value changes
on_submit: fn(String) -> ACallback when user submits (Enter)
on_cursor_move: Option<fn(usize) -> A>Callback when cursor moves without content change
Auto Trait Implementations§
impl<'a, A> Freeze for TextInputProps<'a, A>
impl<'a, A> RefUnwindSafe for TextInputProps<'a, A>
impl<'a, A> Send for TextInputProps<'a, A>
impl<'a, A> Sync for TextInputProps<'a, A>
impl<'a, A> Unpin for TextInputProps<'a, A>
impl<'a, A> UnsafeUnpin for TextInputProps<'a, A>
impl<'a, A> UnwindSafe for TextInputProps<'a, A>
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