Skip to content

Commit

Permalink
set the instance id when the modal show
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardoj committed Aug 27, 2024
1 parent 3570e9e commit 3be4772
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ function PopoverReportActionContextMenu(_props: unknown, ref: ForwardedRef<Repor
});
}
}).then(() => {
setInstanceID(Math.random().toString(36).substr(2, 5));
setDisabledActions(disabledOptions);
typeRef.current = type;
reportIDRef.current = reportID ?? '-1';
Expand All @@ -225,6 +224,7 @@ function PopoverReportActionContextMenu(_props: unknown, ref: ForwardedRef<Repor

/** After Popover shows, call the registered onPopoverShow callback and reset it */
const runAndResetOnPopoverShow = () => {
setInstanceID(Math.random().toString(36).substr(2, 5));
onPopoverShow.current();

// After we have called the action, reset it.
Expand Down

0 comments on commit 3be4772

Please sign in to comment.