Merge pull request #5927 from tchak/fix-multiselect-labels

Fix multiselect labels
This commit is contained in:
Paul Chavard 2021-02-19 14:25:28 +01:00 committed by GitHub
commit 4a08f6cf3f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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('');