diff --git a/src/Gargantext/Components/Forest/Tree.purs b/src/Gargantext/Components/Forest/Tree.purs index 02c0f5baac7ce394d91db0b65cadb20b464cd3a2..b02a0acff5ee08fefd7469a62b7d44091c8e1e32 100644 --- a/src/Gargantext/Components/Forest/Tree.purs +++ b/src/Gargantext/Components/Forest/Tree.purs @@ -200,7 +200,7 @@ toHtml p@{ asyncTasks let withId (NTree (LNode {id: id'}) _) = id' pure $ H.li {} $ - [ nodeMainSpan (isLeaf ary) + [ nodeMainSpan (A.null ary) { id , dispatch: pAction , folderOpen @@ -224,8 +224,6 @@ toHtml p@{ asyncTasks } ) -isLeaf :: Array FTree -> Boolean -isLeaf = not <<< A.null type ChildNodesProps = ( asyncTasks :: R.State GAT.Storage diff --git a/src/Gargantext/Components/Forest/Tree/Node.purs b/src/Gargantext/Components/Forest/Tree/Node.purs index c75d809ac3c575967c1ca407ddd1e1c715ce7b95..dbe5587b135180d5cd31b72447aa96554392da4e 100644 --- a/src/Gargantext/Components/Forest/Tree/Node.purs +++ b/src/Gargantext/Components/Forest/Tree/Node.purs @@ -128,7 +128,8 @@ nodeMainSpan isLeaf p@{ dispatch, folderOpen, frontends, handed, session } = R.c chevronIcon isLeaf handed' nodeType folderOpen'@(open /\ _) = if isLeaf - then + then H.div {} [] + else H.a { className: "chevron-icon" , onClick: R2.effToggler folderOpen' } @@ -139,7 +140,6 @@ nodeMainSpan isLeaf p@{ dispatch, folderOpen, frontends, handed, session } = R.c then "fa fa-chevron-right" else "fa fa-chevron-left" } [] ] - else H.div {} [] folderIcon nodeType folderOpen'@(open /\ _) = H.a { className: "folder-icon"