pub struct TreeProps {Show 13 fields
pub data: Vec<TreeNodeData>,
pub show_checkbox: bool,
pub default_expand_all: bool,
pub expanded_keys: Vec<String>,
pub checked_keys: Vec<String>,
pub current_key: Option<String>,
pub highlight_current: bool,
pub expand_on_click_node: bool,
pub on_node_click: Option<EventHandler<String>>,
pub on_node_expand: Option<EventHandler<(String, bool)>>,
pub on_node_check: Option<EventHandler<(String, bool)>>,
pub class: Option<String>,
pub style: Option<String>,
}Expand description
Tree props
Fields§
§data: Vec<TreeNodeData>Tree data
show_checkbox: boolWhether to show checkboxes
default_expand_all: boolWhether to expand all nodes by default
expanded_keys: Vec<String>Currently expanded node labels
checked_keys: Vec<String>Currently checked node labels
current_key: Option<String>Currently highlighted node label
highlight_current: boolWhether to highlight current node
expand_on_click_node: boolWhether to expand on node click
on_node_click: Option<EventHandler<String>>Node click handler
on_node_expand: Option<EventHandler<(String, bool)>>Node expand/collapse toggle handler
on_node_check: Option<EventHandler<(String, bool)>>Node check handler (for checkboxes)
class: Option<String>§style: Option<String>Implementations§
Source§impl TreeProps
impl TreeProps
Sourcepub fn builder() -> TreePropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> TreePropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building TreeProps.
On the builder, call .data(...)(optional), .show_checkbox(...)(optional), .default_expand_all(...)(optional), .expanded_keys(...)(optional), .checked_keys(...)(optional), .current_key(...)(optional), .highlight_current(...)(optional), .expand_on_click_node(...)(optional), .on_node_click(...)(optional), .on_node_expand(...)(optional), .on_node_check(...)(optional), .class(...)(optional), .style(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of TreeProps.