Skip to content

Commit

Permalink
Merge pull request #671 from vrk-kpa/fix/multiselect-onitemselect-ret…
Browse files Browse the repository at this point in the history
…urn-type

[Fix/BreakingChange] Multiselect onitemselect return type
  • Loading branch information
riitasointi authored Jan 30, 2023
2 parents 9dc59f5 + 28de935 commit 32525f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/Form/Select/MultiSelect/MultiSelect/MultiSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ interface InternalMultiSelectProps<T extends MultiSelectData> {
/** Controlled items; if item is in array, it is selected. If item has disabled: true, it will be disabled. */
selectedItems?: Array<T & MultiSelectData>;
/** Selecting the item will send event with the id */
onItemSelect?: (uniqueItemId: string | null) => void;
onItemSelect?: (uniqueItemId: string) => void;
/** Event to be sent when pressing remove all button */
onRemoveAll?: () => void;
/** Disable the input */
Expand Down Expand Up @@ -332,7 +332,7 @@ class BaseMultiSelect<T> extends Component<
}

if (!!onItemSelect) {
onItemSelect(item?.uniqueItemId || null);
onItemSelect(item.uniqueItemId);
}
if (!!onItemSelectionsChange) {
onItemSelectionsChange(newSelectedItems);
Expand Down

0 comments on commit 32525f3

Please sign in to comment.