Skip to content

Commit

Permalink
Fix #6097: MultiSelect pass selected option to event
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed Mar 6, 2024
1 parent 2e950d4 commit 5c47367
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/lib/multiselect/MultiSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export const MultiSelect = React.memo(
.filter((option) => isValidOption(option))
.map((option) => getOptionValue(option));

updateModel(event, value);
updateModel(event, value, value);
}
};

Expand All @@ -138,7 +138,7 @@ export const MultiSelect = React.memo(
if (selected) value = props.value.filter((val) => !ObjectUtils.equals(val, getOptionValue(option), equalityKey));
else value = [...(props.value || []), getOptionValue(option)];

updateModel(event, value);
updateModel(event, value, value);
index !== -1 && setFocusedOptionIndex(index);
};

Expand Down Expand Up @@ -349,7 +349,7 @@ export const MultiSelect = React.memo(
if (event.code === 'KeyA' && metaKey) {
const value = visibleOptions.filter((option) => isValidOption(option)).map((option) => getOptionValue(option));

updateModel(event, value);
updateModel(event, value, value);

event.preventDefault();
break;
Expand Down

0 comments on commit 5c47367

Please sign in to comment.