From ac397b899f99827a4c999169b24484d1b74cdb99 Mon Sep 17 00:00:00 2001 From: jwnasambu Date: Wed, 29 Sep 2021 18:35:44 +0300 Subject: [PATCH] OCLOMRS-1044:Bug Fix: Pick Concepts from Source and Dictionaries --- .../components/ViewConceptsHeader.tsx | 53 ++++++++----------- 1 file changed, 23 insertions(+), 30 deletions(-) diff --git a/src/apps/concepts/components/ViewConceptsHeader.tsx b/src/apps/concepts/components/ViewConceptsHeader.tsx index a46e6cb0b..5b02cb2fe 100644 --- a/src/apps/concepts/components/ViewConceptsHeader.tsx +++ b/src/apps/concepts/components/ViewConceptsHeader.tsx @@ -10,10 +10,12 @@ import { getContainerIdFromUrl } from "../utils"; import { Button, createStyles, + IconButton, + Input, + InputAdornment, makeStyles, Menu, MenuItem, - TextField, Theme } from "@material-ui/core"; import { @@ -21,10 +23,9 @@ import { useAnchor } from "../../../utils"; import { APISource } from "../../sources"; -import { AccountTreeOutlined, FolderOpen } from "@material-ui/icons"; +import { AccountTreeOutlined, FolderOpen } from "@material-ui/icons"; +import { Search as SearchIcon } from "@material-ui/icons"; import { APIDictionary } from '../../dictionaries/types'; -import Stack from '@mui/material/Stack' -import { Autocomplete } from "@material-ui/lab"; interface Props { containerType: string; @@ -95,6 +96,7 @@ const ViewConceptsHeader: React.FC = ({ handleSwitchSourceClose ] = useAnchor(); + // const [q, setQ] = useState(initialQ); const getTitleBasedOnContainerType = () => { return isAddToDictionary ? `Import existing concept from ${getContainerIdFromUrl(containerUrl)}` @@ -128,32 +130,23 @@ const ViewConceptsHeader: React.FC = ({ open={Boolean(switchSourceAnchor)} onClose={handleSwitchSourceClose} > - + + setShowSources(!showSources)} + data-testid="searchButton" + > + + + + } + /> {preferredSources?.map(({ name, url }) => (