Commit 733a974d authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

tree: rewrite toHtml to use Reactix. Now most of Tree uses Reactix

parent 1b25f351
...@@ -128,6 +128,7 @@ li a#rename-leaf { ...@@ -128,6 +128,7 @@ li a#rename-leaf {
display:none; display:none;
position:absolute; position:absolute;
text-decoration:none; text-decoration:none;
margin-left: 20px;
} }
li:hover a#rename-leaf { li:hover a#rename-leaf {
......
This diff is collapsed.
...@@ -2,20 +2,22 @@ module Gargantext.Utils.Reactix ...@@ -2,20 +2,22 @@ module Gargantext.Utils.Reactix
where where
import Prelude import Prelude
import Data.Maybe ( Maybe(..) )
import Data.Nullable ( Nullable, null, toMaybe )
import Data.Traversable ( traverse_ )
import Data.Tuple ( Tuple(..) )
import Data.Tuple.Nested ( (/\) )
import DOM.Simple.Event as DE import DOM.Simple.Event as DE
import Data.Maybe (Maybe(..))
import Data.Nullable (Nullable, null, toMaybe)
import Data.Traversable (traverse_)
import Data.Tuple (Tuple(..))
import Data.Tuple.Nested ((/\))
import Effect (Effect) import Effect (Effect)
import FFI.Simple ( (...), defineProperty ) import Effect.Uncurried (mkEffectFn1)
import React ( ReactElement ) import FFI.Simple ((...), defineProperty)
import React (ReactElement)
import Reactix as R import Reactix as R
import Reactix.DOM.HTML (ElemFactory) import Reactix.DOM.HTML (ElemFactory)
import Reactix.React (createElement) import Reactix.React (createElement)
import Reactix.SyntheticEvent as RE import Reactix.SyntheticEvent as RE
import Unsafe.Coerce ( unsafeCoerce ) import Unsafe.Coerce (unsafeCoerce)
newtype Point = Point { x :: Number, y :: Number } newtype Point = Point { x :: Number, y :: Number }
-- | Turns a ReactElement into a Reactix Element -- | Turns a ReactElement into a Reactix Element
...@@ -46,3 +48,5 @@ useLayoutEffect1' a f = R.useLayoutEffect1 a $ \_ -> ...@@ -46,3 +48,5 @@ useLayoutEffect1' a f = R.useLayoutEffect1 a $ \_ ->
select :: ElemFactory select :: ElemFactory
select = createElement "select" select = createElement "select"
effToggler (value /\ setValue) = mkEffectFn1 $ \_ -> setValue $ not value
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