Skip to content

Commit

Permalink
setting specific perspective Id
Browse files Browse the repository at this point in the history
  • Loading branch information
vmonakhov committed Sep 13, 2024
1 parent 5b4bc7e commit 68b1d11
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/pages/ListCognates/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const cognatesSummaryMutation = gql`
$languageTitle: String
$perspectiveOffset: Int
$perspectiveLimit: Int
$perspectiveId: LingvodocID
$debugFlag: Boolean
) {
cognates_summary(
Expand All @@ -20,6 +21,7 @@ const cognatesSummaryMutation = gql`
title: $languageTitle
offset: $perspectiveOffset
limit: $perspectiveLimit
p_id: $perspectiveId
debug_flag: $debugFlag
) {
json_url
Expand All @@ -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);
Expand All @@ -56,6 +59,7 @@ const ListCognates = connect(state => state.user)(({user}) => {
languageTitle,
perspectiveOffset,
perspectiveLimit,
perspectiveId,
debugFlag
}
}
Expand Down Expand Up @@ -162,6 +166,18 @@ const ListCognates = connect(state => state.user)(({user}) => {
style={{ width: 80, maxWidth: "40%" }}
/>
<p/>
<Input
label={getTranslation("Perspective Id")}
type='text'
value={perspectiveId}
onChange={(e, { value }) => {
setPerspectiveId(JSON.parse("[" + value + "]"));
setCleanResult(fail);
}}
//className="lingvo-labeled-input"
style={{ width: 80, maxWidth: "40%" }}
/>
<p/>
</div>
)}
<p/>
Expand Down

0 comments on commit 68b1d11

Please sign in to comment.