Skip to content

Commit

Permalink
OCLOMRS-1044:Bug Fix: Pick Concepts from Source and Dictionaries
Browse files Browse the repository at this point in the history
  • Loading branch information
jwamalwa committed Oct 6, 2021
1 parent 99076fc commit 5365eca
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
5 changes: 2 additions & 3 deletions src/apps/concepts/components/ViewConceptsHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ interface Props {
sources: APISource[];
dictionaries: APIDictionary[];
showOnlyVerified: boolean;
toggleShowVerified: () => void;
toggleShowVerified: React.ChangeEventHandler<HTMLInputElement>;
}

const useStyles = makeStyles((theme: Theme) =>
Expand Down Expand Up @@ -143,7 +143,6 @@ const ViewConceptsHeader: React.FC<Props> = ({
>
<Grid
container
// eslint-disable-next-line react/jsx-no-comment-textnodes
direction="column">
<Button
variant="text"
Expand Down Expand Up @@ -184,7 +183,7 @@ const ViewConceptsHeader: React.FC<Props> = ({
/>
}
label={
showOnlyVerified ? `Showing verified dictionaries only` : `Show verified Sources only`
showOnlyVerified ? `Showing verified S only` : `Show verified Sources only`
}
/>
</Grid>
Expand Down
11 changes: 6 additions & 5 deletions src/apps/concepts/pages/ViewConceptsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ const ViewConceptsPage: React.FC<Props> = ({
const isImporting = dictionaryToAddTo !== undefined;

const [q, setQ] = useState(initialQ);
const [showOnlyVerified, setShowOnlyVerified] = useState(false);

const gimmeAUrl = (params: QueryParams = {}, conceptsUrl: string = url) => {
const newParams: QueryParams = {
Expand All @@ -231,7 +232,8 @@ const ViewConceptsPage: React.FC<Props> = ({
generalFilters: generalFilters,
sourceFilters: sourceFilters,
page: 1,
q
q,

},
...params
};
Expand Down Expand Up @@ -306,10 +308,9 @@ const ViewConceptsPage: React.FC<Props> = ({
addConceptToDictionary={dictionaryToAddTo}
sources={sources}
dictionaries={dictionaries}
showOnlyVerified={false}
toggleShowVerified={function (): void {
throw new Error("Function not implemented.");
} }
showOnlyVerified={showOnlyVerified}
toggleShowVerified={(e)=>setShowOnlyVerified(e.target.checked)}

>
<Grid
container
Expand Down

0 comments on commit 5365eca

Please sign in to comment.