Commit 543b31c8 authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[tree] don't toggle node when it is not selected

parent 9c4f2849
......@@ -6,6 +6,7 @@ import Data.Set (Set)
import Data.Set as Set
import Data.String as S
import Data.String.CodeUnits as DSCU
import Data.Tuple (snd)
import Data.Tuple.Nested ((/\))
import Effect (Effect)
import Effect.Aff (Aff, launchAff, launchAff_)
......@@ -286,7 +287,7 @@ nodeLinkCpt = R.hooksComponentWithModule thisModule "nodeLink" cpt
popoverRef <- R.useRef null
pure $
H.div { onClick: R2.effToggler folderOpen }
H.div { on: { click: onClick } }
[ H.a { data: { for: tooltipId
, tip: true
}
......@@ -305,6 +306,12 @@ nodeLinkCpt = R.hooksComponentWithModule thisModule "nodeLink" cpt
]
where
-- NOTE Don't toggle tree if it is not selected
-- This prevents some irritating behaviour
onClick _ = if isSelected then
snd folderOpen not
else
pure unit
tooltipId = "node-link-" <> show id
-- END node link
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment