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 Sep 29, 2021
1 parent 1d574dc commit 8d62e69
Showing 1 changed file with 26 additions and 3 deletions.
29 changes: 26 additions & 3 deletions src/apps/concepts/components/ViewConceptsHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ import { getContainerIdFromUrl } from "../utils";
import {
Button,
createStyles,
IconButton,
Input,
InputAdornment,
makeStyles,
Menu,
MenuItem,
Expand All @@ -20,7 +23,8 @@ 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';

interface Props {
Expand Down Expand Up @@ -125,12 +129,31 @@ const ViewConceptsHeader: React.FC<Props> = ({
open={Boolean(switchSourceAnchor)}
onClose={handleSwitchSourceClose}
>
<Button
{/* <Button
variant="text"
onClick={() => setShowSources(!showSources)}
>
{showSources ? "Select a recommended source" : "Select an alternative source"}
</Button>
</Button> */}
<Input
//onChange={e => setQ(e.target.value)}
// ]value={q}
color="secondary"
type="search"
fullWidth
placeholder={`Select an alternative source`}
data-testid="searchInput"
endAdornment={
<InputAdornment position="end">
<IconButton
// onClick={() => onSearch(q)}
data-testid="searchButton"
>
<SearchIcon />
</IconButton>
</InputAdornment>
}
/>
{preferredSources?.map(({ name, url }) => (
<MenuItem
// replace because we want to keep the back button useful
Expand Down

0 comments on commit 8d62e69

Please sign in to comment.