File tree Expand file tree Collapse file tree
src/components/TermEditor/newTerm Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,13 +6,15 @@ import {
66 Stack ,
77 Typography ,
88 Autocomplete ,
9- TextField
9+ TextField ,
10+ Chip
1011} from "@mui/material" ;
1112import { GlobalDataContext } from "../../../contexts/DataContext" ;
1213import CustomSingleSelect from "../../common/CustomSingleSelect" ;
1314import CustomFormField from "../../common/CustomFormField" ;
1415import NewTermSidebar from "../NewTermSidebar" ;
1516import { HelpOutlinedIcon } from "../../../Icons" ;
17+ import CloseIcon from "@mui/icons-material/Close" ;
1618import { vars } from "../../../theme/variables" ;
1719import { TYPES , DEFAULT_TYPE } from "../../../constants/types" ;
1820import { useTermSearch } from "../../../hooks/useTermSearch" ;
@@ -105,6 +107,17 @@ const FirstStepContent = ({
105107 [ handleTermChange , onTermSelect ] ,
106108 )
107109
110+ const renderChips = useCallback ( ( values , getTagProps , chipStyles ) =>
111+ values . map ( ( option , index ) => (
112+ < Chip
113+ key = { index }
114+ label = { option }
115+ deleteIcon = { < CloseIcon /> }
116+ sx = { chipStyles }
117+ { ...getTagProps ( { index } ) }
118+ />
119+ ) ) , [ ] ) ;
120+
108121 return (
109122 < Box display = "flex" height = { 1 } >
110123 < Box sx = { styles . contentBox } >
You can’t perform that action at this time.
0 commit comments