diff --git a/client/src/components/dialogs/import/Nominatim.tsx b/client/src/components/dialogs/import/Nominatim.tsx index d28bba1f..9e4c9b57 100644 --- a/client/src/components/dialogs/import/Nominatim.tsx +++ b/client/src/components/dialogs/import/Nominatim.tsx @@ -75,8 +75,10 @@ export default function Nominatim({ ) }} inputValue={inputValue} - onInputChange={(_e, newInputValue) => { - setInputValue(newInputValue) + onInputChange={(e, newInputValue) => { + if (e && e.type !== 'click') { + setInputValue(newInputValue) + } }} renderInput={(params) => ( ([]) + const [inputValue, setInputValue] = React.useState('') React.useEffect(() => { if (controlled) setSelected(initialState) @@ -166,13 +167,19 @@ export default function InstanceSelect({ > updateState(newValue as KojiKey[])} filterOptions={filterOptions} + loading={loading} + onChange={(_e, newValue) => updateState(newValue as KojiKey[])} + onInputChange={(e, newInputValue) => { + if (e && e.type !== 'click') { + setInputValue(newInputValue) + } + }} selectOnFocus clearOnBlur multiple - loading={loading} handleHomeEndKeys disableCloseOnSelect fullWidth diff --git a/client/src/components/drawer/inputs/SelectProject.tsx b/client/src/components/drawer/inputs/SelectProject.tsx index 876afa21..9105af86 100644 --- a/client/src/components/drawer/inputs/SelectProject.tsx +++ b/client/src/components/drawer/inputs/SelectProject.tsx @@ -34,6 +34,7 @@ export default function SelectProject({ const [loading, setLoading] = React.useState(false) const [selected, setSelected] = React.useState([]) + const [inputValue, setInputValue] = React.useState('') const filterOptions = createFilterOptions({ matchFrom: 'any', @@ -103,7 +104,13 @@ export default function SelectProject({ newValue && updateState(newValue)} + onInputChange={(e, newInputValue) => { + if (e && e.type !== 'click') { + setInputValue(newInputValue) + } + }} value={selected} filterOptions={filterOptions} selectOnFocus