pub struct TransferProps {Show 16 fields
pub data_source: Vec<TransferItem>,
pub target_keys: Option<Vec<String>>,
pub selected_keys: Option<Vec<String>>,
pub titles: Option<(String, String)>,
pub operations: Option<(String, String)>,
pub show_search: bool,
pub search_placeholder: Option<String>,
pub disabled: bool,
pub show_select_all: bool,
pub one_way: bool,
pub on_change: Option<EventHandler<(Vec<String>, TransferDirection, Vec<String>)>>,
pub on_select_change: Option<EventHandler<(Vec<String>, Vec<String>)>>,
pub on_search: Option<EventHandler<(TransferDirection, String)>>,
pub filter_option: Option<fn(&str, &TransferItem, TransferDirection) -> bool>,
pub class: Option<String>,
pub style: Option<String>,
}Expand description
Props for the Transfer component.
Fields§
§data_source: Vec<TransferItem>Data source for the transfer lists.
target_keys: Option<Vec<String>>Keys of items that should be in the right (target) list.
selected_keys: Option<Vec<String>>Keys of items that are currently selected.
titles: Option<(String, String)>Titles for the left and right lists.
operations: Option<(String, String)>Text for the transfer operation buttons.
show_search: boolWhether to show search input in the lists.
search_placeholder: Option<String>Placeholder text for the search input.
disabled: boolWhether the component is disabled.
show_select_all: boolWhether to show select all checkbox.
one_way: boolOne-way mode: items can only be moved from left to right.
on_change: Option<EventHandler<(Vec<String>, TransferDirection, Vec<String>)>>Callback when target keys change.
on_select_change: Option<EventHandler<(Vec<String>, Vec<String>)>>Callback when selection changes.
on_search: Option<EventHandler<(TransferDirection, String)>>Callback when search text changes.
filter_option: Option<fn(&str, &TransferItem, TransferDirection) -> bool>Custom filter function for search.
class: Option<String>Extra class for the root element.
style: Option<String>Inline style for the root element.
Implementations§
Source§impl TransferProps
impl TransferProps
Sourcepub fn builder() -> TransferPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> TransferPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building TransferProps.
On the builder, call .data_source(...), .target_keys(...)(optional), .selected_keys(...)(optional), .titles(...)(optional), .operations(...)(optional), .show_search(...)(optional), .search_placeholder(...)(optional), .disabled(...)(optional), .show_select_all(...)(optional), .one_way(...)(optional), .on_change(...)(optional), .on_select_change(...)(optional), .on_search(...)(optional), .filter_option(...)(optional), .class(...)(optional), .style(...)(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§fn clone(&self) -> TransferProps
fn clone(&self) -> TransferProps
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more