From 68b1d11b89d09197b7d1f64844eec740a58a7900 Mon Sep 17 00:00:00 2001 From: vmonakhov Date: Fri, 13 Sep 2024 13:38:25 +0300 Subject: [PATCH] setting specific perspective Id --- src/pages/ListCognates/index.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/pages/ListCognates/index.js b/src/pages/ListCognates/index.js index 545d0d66..8245313e 100644 --- a/src/pages/ListCognates/index.js +++ b/src/pages/ListCognates/index.js @@ -12,6 +12,7 @@ const cognatesSummaryMutation = gql` $languageTitle: String $perspectiveOffset: Int $perspectiveLimit: Int + $perspectiveId: LingvodocID $debugFlag: Boolean ) { cognates_summary( @@ -20,6 +21,7 @@ const cognatesSummaryMutation = gql` title: $languageTitle offset: $perspectiveOffset limit: $perspectiveLimit + p_id: $perspectiveId debug_flag: $debugFlag ) { json_url @@ -38,6 +40,7 @@ const ListCognates = connect(state => state.user)(({user}) => { const [languageTitle, setLanguageTitle] = useState(null); const [perspectiveOffset, setPerspectiveOffset] = useState(0); const [perspectiveLimit, setPerspectiveLimit] = useState(10); + const [perspectiveId, setPerspectiveId] = useState(null); const [shownParentGroup, showParentGroup] = useState(false); const [shownLanguagePosition, showLanguagePosition] = useState(false); const [getCognatesSummary, { data, error, loading }] = useMutation(cognatesSummaryMutation); @@ -56,6 +59,7 @@ const ListCognates = connect(state => state.user)(({user}) => { languageTitle, perspectiveOffset, perspectiveLimit, + perspectiveId, debugFlag } } @@ -162,6 +166,18 @@ const ListCognates = connect(state => state.user)(({user}) => { style={{ width: 80, maxWidth: "40%" }} />

+ { + setPerspectiveId(JSON.parse("[" + value + "]")); + setCleanResult(fail); + }} + //className="lingvo-labeled-input" + style={{ width: 80, maxWidth: "40%" }} + /> +

)}