pub struct TreeNodeTargetProps<T: Clone + PartialEq + 'static> {
pub node: NodeId,
pub row_height: f64,
pub accepts: Option<Callback<(T, DropIntent), bool>>,
pub on_drop: EventHandler<TreeDropEvent<T>>,
pub label: Option<String>,
pub attributes: Vec<Attribute>,
pub children: Element,
}Expand description
Properties for the TreeNodeTarget component.
Fields§
§node: NodeIdThe node this row represents.
row_height: f64Height of the row in pixels, used for the before/into/after bands.
Keep this close to the actual rendered row height: keyboard drops resolve
their intent from the measured row center against this value, so a large
mismatch (e.g. wrapped/custom content taller than the default) can bias a
keyboard drop toward After/Before instead of Into.
accepts: Option<Callback<(T, DropIntent), bool>>Reject drops (typically: cycle prevention). Receives (payload, intent).
on_drop: EventHandler<TreeDropEvent<T>>§label: Option<String>Announced to screen readers during keyboard navigation.
attributes: Vec<Attribute>§children: ElementImplementations§
Source§impl<T: Clone + PartialEq + 'static> TreeNodeTargetProps<T>
impl<T: Clone + PartialEq + 'static> TreeNodeTargetProps<T>
Sourcepub fn builder() -> TreeNodeTargetPropsBuilder<((), (), (), (), (), (), ()), T>
pub fn builder() -> TreeNodeTargetPropsBuilder<((), (), (), (), (), (), ()), T>
Create a builder for building TreeNodeTargetProps.
On the builder, call .node(...), .row_height(...)(optional), .accepts(...)(optional), .on_drop(...), .label(...)(optional), .attributes(...)(optional), .children(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of TreeNodeTargetProps.