Commit 49b073c0 authored by Karen Konou's avatar Karen Konou

[Graph legend] Display first five nodes only

parent efe681cb
Pipeline #6926 passed with stages
in 15 minutes and 29 seconds
......@@ -5,16 +5,14 @@ module Gargantext.Components.GraphExplorer.Sidebar.Legend
import Prelude hiding (map)
import Control.Applicative (map)
import Data.Array (fromFoldable, snoc)
import Data.Array (fromFoldable)
import Data.Array as A
import Data.Foldable (length)
import Data.Maybe (isJust, maybe)
import Data.Sequence (Seq, replace)
import Data.Set as Set
import Data.Traversable (foldMap, intercalate)
import Effect (Effect)
import Effect.Aff (launchAff_)
import Effect.Class (liftEffect)
import Gargantext.Components.Bootstrap as B
import Gargantext.Components.GraphExplorer.API (updateLegend)
import Gargantext.Components.GraphExplorer.GraphTypes as GEGT
......@@ -51,7 +49,6 @@ legendCpt = here.component "legend" cpt where
, selectedNodeIds
, session
, graphId
, legendBox
} _ = do
-- | Hooks
-- |
......@@ -169,7 +166,7 @@ selectedNodesCpt = here.component "selectedNodes" cpt where
H.ul
{ className: "graph-legend-nodes" }
[
flip foldMap (filterByCluster clusterId extractedNodeList)
flip foldMap (A.take 5 (filterByCluster clusterId extractedNodeList))
\(GEGT.Node { label: nodeLabel, id_: nodeId }) ->
H.li
......
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