#235 - Fix for reselecting the previously removed value

This commit is contained in:
Elio Struyf
2022-01-24 18:34:24 +01:00
parent 8dcbe67152
commit a16c0c6355
2 changed files with 1 additions and 2 deletions
@@ -83,7 +83,7 @@ export const ChoiceField: React.FunctionComponent<IChoiceFieldProps> = ({label,
<Downshift
ref={dsRef}
onChange={(selected) => onValueChange(selected || "")}
onSelect={(selected) => onValueChange(selected || "")}
itemToString={item => (item ? item : '')}>
{({ getToggleButtonProps, getItemProps, getMenuProps, isOpen, getRootProps }) => (
<div {...getRootProps(undefined, {suppressRefError: true})} className={`metadata_field__choice`}>
-1
View File
@@ -20,7 +20,6 @@ import { DateHelper } from '../../helpers/DateHelper';
import FieldBoundary from './ErrorBoundary/FieldBoundary';
import { DraftField } from './Fields/DraftField';
import { VsLabel } from './VscodeComponents';
import { CogIcon } from '@heroicons/react/outline';
export interface IMetadata {
[prop: string]: string[] | string | null | IMetadata;