Merge pull request #5928 from betagouv/main

2021-02-19-03
This commit is contained in:
Paul Chavard 2021-02-19 14:27:07 +01:00 committed by GitHub
commit 25a33a3803
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('');