pub struct MultiSelect<T: Clone> {
pub value: Value<Vec<T>>,
pub options: Computed<Vec<T>>,
}Expand description
Select component based on vector of T values,
which allows to have multiple options selected at once.
Example:
use vertigo::{DomNode, dom, Value};
use vertigo_forms::MultiSelect;
let value = Value::new(vec!["foo".to_string()]);
let options = Value::new(
vec![
"foo".to_string(),
"bar".to_string(),
"baz".to_string(),
]
);
dom! {
<MultiSelect
value={value.clone()}
options={options}
/>
};Fields§
§value: Value<Vec<T>>§options: Computed<Vec<T>>Implementations§
Auto Trait Implementations§
impl<T> Freeze for MultiSelect<T>
impl<T> !RefUnwindSafe for MultiSelect<T>
impl<T> !Send for MultiSelect<T>
impl<T> !Sync for MultiSelect<T>
impl<T> Unpin for MultiSelect<T>
impl<T> !UnwindSafe for MultiSelect<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