Fix multiselect labels
only add values to new values if it is a new value
This commit is contained in:
parent
a7331dd30d
commit
2c2b392d6c
1 changed files with 7 additions and 1 deletions
|
@ -107,7 +107,13 @@ function ComboMultipleDropdownList({
|
|||
);
|
||||
const selectedValue = maybeValue && maybeValue[1];
|
||||
if (value) {
|
||||
setNewValues([...newValues, selectedValue]);
|
||||
if (
|
||||
acceptNewValues &&
|
||||
extraOptions[0] &&
|
||||
extraOptions[0][0] == selectedValue
|
||||
) {
|
||||
setNewValues([...newValues, selectedValue]);
|
||||
}
|
||||
saveSelection([...selections, selectedValue]);
|
||||
}
|
||||
setTerm('');
|
||||
|
|
Loading…
Reference in a new issue