pub struct TransferProps {
pub items: Vec<TransferItem>,
pub target_items: Vec<TransferItem>,
pub value: Option<Vec<String>>,
pub default_value: Option<Vec<String>>,
pub on_value_change: Option<EventHandler<Vec<String>>>,
pub disabled: bool,
pub name: Option<String>,
pub source_title: String,
pub target_title: String,
pub empty_label: String,
pub class: Option<String>,
pub attributes: Vec<Attribute>,
}Expand description
Props for Transfer.
Fields§
§items: Vec<TransferItem>Items that start in the source list.
target_items: Vec<TransferItem>Items that start in the target list.
value: Option<Vec<String>>Controlled keys of the target list.
default_value: Option<Vec<String>>Initial target keys when uncontrolled. Defaults to the keys of target_items.
on_value_change: Option<EventHandler<Vec<String>>>Called with the new target keys.
disabled: boolDisables both lists and buttons.
name: Option<String>Form field name; each target key is submitted as a hidden input.
source_title: StringSource list heading.
target_title: StringTarget list heading.
empty_label: StringMessage shown in a list with no items.
class: Option<String>Extra classes appended after the Lumen class.
attributes: Vec<Attribute>Any other <div> or global attribute.
Implementations§
Source§impl TransferProps
impl TransferProps
Sourcepub fn builder() -> TransferPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> TransferPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building TransferProps.
On the builder, call .items(...)(optional), .target_items(...)(optional), .value(...)(optional), .default_value(...)(optional), .on_value_change(...)(optional), .disabled(...)(optional), .name(...)(optional), .source_title(...)(optional), .target_title(...)(optional), .empty_label(...)(optional), .class(...)(optional), .attributes(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of TransferProps.
Trait Implementations§
Source§impl Clone for TransferProps
impl Clone for TransferProps
Source§impl PartialEq for TransferProps
impl PartialEq for TransferProps
Source§impl Properties for TransferPropswhere
Self: Clone,
impl Properties for TransferPropswhere
Self: Clone,
Source§type Builder = TransferPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), ())>
type Builder = TransferPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), ())>
Source§fn memoize(&mut self, new: &Self) -> bool
fn memoize(&mut self, new: &Self) -> bool
Source§fn into_vcomponent<M>(
self,
render_fn: impl ComponentFunction<Self, M>,
) -> VComponentwhere
M: 'static,
fn into_vcomponent<M>(
self,
render_fn: impl ComponentFunction<Self, M>,
) -> VComponentwhere
M: 'static,
impl StructuralPartialEq for TransferProps
Auto Trait Implementations§
impl !RefUnwindSafe for TransferProps
impl !Send for TransferProps
impl !Sync for TransferProps
impl !UnwindSafe for TransferProps
impl Forget for TransferProps
impl Freeze for TransferPropswhere
*const u8 is !null: Freeze,
PhantomData<TransferItem>: Freeze,
PhantomData<String>: Freeze,
&'static UnsyncStorage: Freeze,
NonZero<u64>: Freeze,
&'static Location<'static>: Freeze,
PhantomData<Option<ExternalListenerCallback<Vec<String>, ()>>>: Freeze,
PhantomData<u8>: Freeze,
PhantomData<Attribute>: Freeze,
impl Move for TransferProps
impl Unpin for TransferProps
impl UnsafeUnpin for TransferPropswhere
*const u8 is !null: UnsafeUnpin,
PhantomData<TransferItem>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
&'static UnsyncStorage: UnsafeUnpin,
NonZeroU64Inner: UnsafeUnpin,
&'static Location<'static>: UnsafeUnpin,
PhantomData<Option<ExternalListenerCallback<Vec<String>, ()>>>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Attribute>: UnsafeUnpin,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DependencyElement for T
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
Source§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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