mirror of
https://github.com/yewprint/yewprint
synced 2025-02-16 12:08:25 +00:00
CLEANUP
This commit is contained in:
parent
cf69038772
commit
eafd9bc339
1 changed files with 5 additions and 7 deletions
12
src/tree.rs
12
src/tree.rs
|
@ -155,7 +155,7 @@ impl<T: Clone> Tree<T> {
|
|||
let node = tree.get(node_id).unwrap();
|
||||
let children = node.children();
|
||||
|
||||
let nodes = children
|
||||
children
|
||||
.iter()
|
||||
.map(|node_id| {
|
||||
let key = {
|
||||
|
@ -197,9 +197,7 @@ impl<T: Clone> Tree<T> {
|
|||
</TreeNode>
|
||||
}
|
||||
})
|
||||
.collect::<Html>();
|
||||
|
||||
return nodes;
|
||||
.collect::<Html>()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -221,9 +219,9 @@ struct TreeNodeProps {
|
|||
is_selected: bool,
|
||||
label: yew::virtual_dom::VNode,
|
||||
secondary_label: Option<yew::virtual_dom::VNode>,
|
||||
on_collapse: Option<Callback<(id_tree::NodeId, MouseEvent)>>,
|
||||
on_expand: Option<Callback<(id_tree::NodeId, MouseEvent)>>,
|
||||
onclick: Option<Callback<(id_tree::NodeId, MouseEvent)>>,
|
||||
on_collapse: Option<Callback<(NodeId, MouseEvent)>>,
|
||||
on_expand: Option<Callback<(NodeId, MouseEvent)>>,
|
||||
onclick: Option<Callback<(NodeId, MouseEvent)>>,
|
||||
children: html::Children,
|
||||
depth: u32,
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue