Skip to content

Commit

Permalink
Fix remove callback
Browse files Browse the repository at this point in the history
  • Loading branch information
dlcaldeira committed Nov 24, 2023
1 parent 94e7285 commit 3462df8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export const Enumeration = ({
const handleOnRemove = async (itemsToRemove: string[]) => {
try {
await onRemove?.(itemsToRemove);
onChange(items.filter(item => !selectedItems.includes(item)));
onChange(items.filter(item => !itemsToRemove.includes(item)));
} catch (e) {
//The parent component must do the error handling
}
Expand Down

0 comments on commit 3462df8

Please sign in to comment.