Commit d51a608e authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[annuaire,texts] clear cache toggle button

parent 15fe348f
......@@ -7,12 +7,13 @@ import Data.List as L
import Data.Maybe (Maybe(..), maybe, fromMaybe)
import Data.Tuple (fst, snd)
import Data.Tuple.Nested ((/\))
import Effect.Aff (Aff)
import Effect.Aff (Aff, launchAff_)
import Reactix as R
import Reactix.DOM.HTML as H
import Gargantext.Prelude
import Gargantext.Components.NgramsTable.Loader (clearCache)
import Gargantext.Components.Nodes.Annuaire.User.Contacts.Types as CT
import Gargantext.Components.Nodes.Lists.Types as NT
import Gargantext.Components.Table as T
......@@ -92,7 +93,7 @@ annuaireCpt = R2.hooksComponent thisModule "annuaire" cpt
cacheState <- R.useState' NT.CacheOn
pure $ R.fragment
[ T.tableHeaderLayout { afterCacheStateChange: \_ -> pure unit
[ T.tableHeaderLayout { afterCacheStateChange: \_ -> launchAff_ $ clearCache unit
, cacheState
, date
, desc: name
......
......@@ -5,11 +5,13 @@ import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Show (genericShow)
import Data.Maybe (Maybe(..))
import Data.Tuple.Nested ((/\))
import Effect.Aff (launchAff_)
import Reactix as R
import Reactix.DOM.HTML as H
--------------------------------------------------------
import Gargantext.Components.DocsTable as DT
import Gargantext.Components.Loader (loader)
import Gargantext.Components.NgramsTable.Loader (clearCache)
import Gargantext.Components.Node (NodePoly(..))
import Gargantext.Components.Nodes.Corpus (loadCorpusWithChild)
import Gargantext.Components.Nodes.Corpus.Chart.Histo (histo)
......@@ -64,7 +66,7 @@ textsLayoutWithKeyCpt = R2.hooksComponent thisModule "textsLayoutWithKey" cpt
title = "Corpus " <> name
R.fragment [
Table.tableHeaderLayout { afterCacheStateChange: \_ -> pure unit
Table.tableHeaderLayout { afterCacheStateChange: \_ -> launchAff_ $ clearCache unit
, cacheState
, date
, desc
......
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