Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/components/PopoverMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ type PopoverMenuProps = Partial<PopoverModalProps> & {
/** Should we apply padding style in modal itself. If this value is false, we will handle it in ScreenWrapper */
shouldUseModalPaddingStyle?: boolean;

/** Whether we want to avoid the safari exception of ignoring shouldCallAfterModalHide */
shouldAvoidSafariException?: boolean;

/** Used to locate the component in the tests */
testID?: string;
};
Expand Down Expand Up @@ -187,6 +190,7 @@ function PopoverMenu({
shouldUseModalPaddingStyle,
shouldUseNewModal,
testID,
shouldAvoidSafariException = false,
}: PopoverMenuProps) {
const styles = useThemeStyles();
const theme = useTheme();
Expand All @@ -212,7 +216,7 @@ function PopoverMenu({
setEnteredSubMenuIndexes([...enteredSubMenuIndexes, index]);
const selectedSubMenuItemIndex = selectedItem?.subMenuItems.findIndex((option) => option.isSelected);
setFocusedIndex(selectedSubMenuItemIndex);
} else if (selectedItem.shouldCallAfterModalHide && !isSafari()) {
} else if (selectedItem.shouldCallAfterModalHide && (!isSafari() || shouldAvoidSafariException)) {
onItemSelected?.(selectedItem, index);
close(
() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ function SearchTypeMenuPopover({queryJSON, searchName, shouldGroupByReports}: Se
shouldUseScrollView
shouldUseModalPaddingStyle={false}
innerContainerStyle={{paddingBottom: unmodifiedPaddings.bottom}}
shouldAvoidSafariException
/>
)}
<DeleteConfirmModal />
Expand Down