File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -223,6 +223,7 @@ function ButtonWithDropdownMenu<IValueType>({
223223 setIsMenuVisible ( false ) ;
224224 onOptionsMenuHide ?.( ) ;
225225 } }
226+ shouldHandleNavigationBack
226227 onModalShow = { onOptionsMenuShow }
227228 onItemSelected = { ( selectedSubitem , index , event ) => {
228229 onSubItemSelected ?.( selectedSubitem , index , event ) ;
Original file line number Diff line number Diff line change @@ -158,6 +158,9 @@ type PopoverMenuProps = Partial<PopoverModalProps> & {
158158
159159 /** Used to locate the component in the tests */
160160 testID ?: string ;
161+
162+ /** Whether handle navigation back when modal show. */
163+ shouldHandleNavigationBack ?: boolean ;
161164} ;
162165
163166const renderWithConditionalWrapper = ( shouldUseScrollView : boolean , contentContainerStyle : StyleProp < ViewStyle > , children : ReactNode ) : React . JSX . Element => {
@@ -209,6 +212,7 @@ function PopoverMenu({
209212 shouldUseModalPaddingStyle,
210213 shouldAvoidSafariException = false ,
211214 testID,
215+ shouldHandleNavigationBack,
212216} : PopoverMenuProps ) {
213217 const styles = useThemeStyles ( ) ;
214218 const theme = useTheme ( ) ;
@@ -405,6 +409,7 @@ function PopoverMenu({
405409 setEnteredSubMenuIndexes ( CONST . EMPTY_ARRAY ) ;
406410 onClose ( ) ;
407411 } }
412+ shouldHandleNavigationBack = { shouldHandleNavigationBack }
408413 isVisible = { isVisible }
409414 onModalHide = { handleModalHide }
410415 onModalShow = { onModalShow }
You can’t perform that action at this time.
0 commit comments