Skip to content

Commit

Permalink
Fix items click after navigation between dash and presentations (#1831)
Browse files Browse the repository at this point in the history
  • Loading branch information
flops authored Nov 21, 2024
1 parent 26d4fe4 commit 34d7034
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/ui/utils/getActionPanelItems.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,10 @@ export const getActionPanelItems = ({
if (filterItem && filterItem(item)) {
return result;
} else {
if (item.dragProps?.type && !item.onClick) {
// eslint-disable-next-line no-param-reassign
item.onClick = () =>
openDialog(
TYPES_TO_DIALOGS_MAP[
item.dragProps?.type as keyof typeof TYPES_TO_DIALOGS_MAP
],
);
}
item.onClick = () =>
openDialog(
TYPES_TO_DIALOGS_MAP[item.dragProps?.type as keyof typeof TYPES_TO_DIALOGS_MAP],
);

return [...result, item];
}
Expand Down

0 comments on commit 34d7034

Please sign in to comment.