diff --git a/src/Gargantext/Components/DocsTable.purs b/src/Gargantext/Components/DocsTable.purs index 1bd7b48e4108db939150ce3ae7a12607f5fa7e5d..629a41abe47c8ebdaad3a1bcef60d37a06f49ff6 100644 --- a/src/Gargantext/Components/DocsTable.purs +++ b/src/Gargantext/Components/DocsTable.purs @@ -218,7 +218,7 @@ docViewCpt = R.hooksComponentWithModule thisModule "docView" cpt where [ pageLayout { cacheState , corpusId , frontends - , key: show $ fst cacheState + , key: "docView-" <> (show $ fst cacheState) , listId , nodeId , params diff --git a/src/Gargantext/Components/Nodes/Annuaire.purs b/src/Gargantext/Components/Nodes/Annuaire.purs index 74dc947a9b7c76c4b8f13b74dd50c08ee7861629..e6e61553d6a752bb05e90920c6d9fa95887371c6 100644 --- a/src/Gargantext/Components/Nodes/Annuaire.purs +++ b/src/Gargantext/Components/Nodes/Annuaire.purs @@ -98,6 +98,7 @@ annuaireCpt = R.hooksComponentWithModule thisModule "annuaire" cpt , cacheState , date , desc: name + , key: "annuaire-" <> (show $ fst cacheState) , query: "" , title: name , user: "" } diff --git a/src/Gargantext/Components/Nodes/Lists.purs b/src/Gargantext/Components/Nodes/Lists.purs index 00db394786394b75abd931d9bee0b0e77d726384..6ec1e2017c585d2451d4560727fbf69be98fadc4 100644 --- a/src/Gargantext/Components/Nodes/Lists.purs +++ b/src/Gargantext/Components/Nodes/Lists.purs @@ -1,5 +1,6 @@ module Gargantext.Components.Nodes.Lists where +import Data.Tuple (fst) import Effect.Aff (launchAff_) import Reactix as R ------------------------------------------------------------------------ @@ -63,6 +64,7 @@ listsLayoutWithKeyCpt = R.hooksComponentWithModule thisModule "listsLayoutWithKe , cacheState , date , desc + , key: "listsLayoutWithKey-header-" <> (show $ fst cacheState) , query , title: "Corpus " <> name , user: authors } @@ -70,6 +72,7 @@ listsLayoutWithKeyCpt = R.hooksComponentWithModule thisModule "listsLayoutWithKe cacheState , corpusData , corpusId + , key: "listsLayoutWithKey-tabs-" <> (show $ fst cacheState) , session } ] ------------------------------------------------------------------------ diff --git a/src/Gargantext/Components/Nodes/Lists/Tabs.purs b/src/Gargantext/Components/Nodes/Lists/Tabs.purs index 69f2f4678b06654d69936346e9c49fdb4d18b93e..0d597ef574dbbf99bef2de4798c92af462aebcf5 100644 --- a/src/Gargantext/Components/Nodes/Lists/Tabs.purs +++ b/src/Gargantext/Components/Nodes/Lists/Tabs.purs @@ -33,10 +33,15 @@ type Props = ( cacheState :: R.State NTypes.CacheState , session :: Session ) -tabs :: Record Props -> R.Element +type PropsWithKey = ( + key :: String + | Props + ) + +tabs :: Record PropsWithKey -> R.Element tabs props = R.createElement tabsCpt props [] -tabsCpt :: R.Component Props +tabsCpt :: R.Component PropsWithKey tabsCpt = R.hooksComponentWithModule thisModule "tabs" cpt where cpt { cacheState, corpusData: corpusData@{ defaultListId }, corpusId, session } _ = do diff --git a/src/Gargantext/Components/Nodes/Texts.purs b/src/Gargantext/Components/Nodes/Texts.purs index 82f57348f62fccf2c4254d5f633a9f260e6d006c..0b555dff1a46831aaf676d9bf3bf021c9f948747 100644 --- a/src/Gargantext/Components/Nodes/Texts.purs +++ b/src/Gargantext/Components/Nodes/Texts.purs @@ -4,6 +4,7 @@ import Prelude import Data.Generic.Rep (class Generic) import Data.Generic.Rep.Show (genericShow) import Data.Maybe (Maybe(..)) +import Data.Tuple (fst) import Data.Tuple.Nested ((/\)) import Effect.Aff (launchAff_) import Reactix as R @@ -69,6 +70,7 @@ textsLayoutWithKeyCpt = R.hooksComponentWithModule thisModule "textsLayoutWithKe , cacheState , date , desc + , key: "textsLayoutWithKey-" <> (show $ fst cacheState) , query , title , user: authors } diff --git a/src/Gargantext/Components/Table.purs b/src/Gargantext/Components/Table.purs index 82b1a4a63a06dd7a406759c481235047a3b5cee4..52213e331fee32273b2512fb4b23269a3dfe8f1a 100644 --- a/src/Gargantext/Components/Table.purs +++ b/src/Gargantext/Components/Table.purs @@ -99,6 +99,7 @@ type TableHeaderLayoutProps = , cacheState :: R.State NT.CacheState , date :: String , desc :: String + , key :: String , query :: String , title :: String , user :: String