reset the default value to empty string

This commit is contained in:
arpitnath 2021-11-01 14:52:13 +05:30
parent c0bcaa1d7f
commit 6845422613

View file

@ -63,7 +63,7 @@ export const DropDown = function DropDown({
const value = currentValueProperty ? currentValueProperty.value : '';
const [currentValue, setCurrentValue] = useState('');
const [optionValues, setOptionValue] = useState(() => selectOptions);
const [optionValues, setOptionValue] = useState(() => selectOptions ?? '');
useEffect(() => {
const nextOptionValues = JSON.stringify(parsedValues);