Skip to content

Commit

Permalink
feat: Close dropdown on selection
Browse files Browse the repository at this point in the history
  • Loading branch information
afonsobspinto committed May 14, 2024
1 parent 0544dd2 commit 6ae8655
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/components/common/CustomMappingDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ export default function CustomEntitiesDropdown({
setSelectedOptions(updatedSelectedOptions);
} else {
setSelectedOptions([...selectedOptions, option]);
setAnchorEl(null);
}
onSelection(option, !isOptionAlreadySelected)
};
Expand All @@ -333,6 +334,7 @@ export default function CustomEntitiesDropdown({
if(isCustomDictionaryValid(customDictionaryFieldOption, headerIndexes)){
customDictionaryFieldOption.label = getAbbreviationFromOption(customDictionaryFieldOption, headerIndexes)
onCustomDictionaryFieldCreation(customDictionaryFieldOption, true);
setAnchorEl(null);
}else{
setErrorMessage("Missing at least one mandatory property (title or abbreviation) ")
}
Expand Down

0 comments on commit 6ae8655

Please sign in to comment.