pub struct DictSelect<T: Clone + From<String> + PartialEq + ToString + 'static> {
pub value: Value<i64>,
pub options: Computed<Vec<(i64, T)>>,
}Expand description
Simple Select component based on map of i64->T values.
Example:
use vertigo::{DomNode, dom, Value};
use vertigo_forms::DictSelect;
let value = Value::new(1);
let options = Value::new(
vec![
(1, "foo".to_string()),
(2, "bar".to_string()),
(3, "baz".to_string()),
]
);
dom! {
<DictSelect
value={value.clone()}
options={options}
/>
};Fields§
§value: Value<i64>§options: Computed<Vec<(i64, T)>>Implementations§
Auto Trait Implementations§
impl<T> Freeze for DictSelect<T>
impl<T> !RefUnwindSafe for DictSelect<T>
impl<T> !Send for DictSelect<T>
impl<T> !Sync for DictSelect<T>
impl<T> Unpin for DictSelect<T>
impl<T> !UnwindSafe for DictSelect<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