From 05c6700ae0a6f8e475d17f384c2483d4dc219ff0 Mon Sep 17 00:00:00 2001 From: Drapich Piotr Date: Mon, 1 Feb 2021 18:20:17 +0100 Subject: [PATCH] [RNMobile] Fix height of the bottom-sheet after using back button (#28632) * remove unused param and setHeight even if it is the same --- .../bottom-sheet-navigation/navigation-container.native.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/components/src/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js b/packages/components/src/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js index afa238b144d0c..660a86b6e24a7 100644 --- a/packages/components/src/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +++ b/packages/components/src/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js @@ -80,7 +80,7 @@ function BottomSheetNavigationContainer( { children, animate, main, theme } ) { }; const setHeight = useCallback( - ( height, layout ) => { + ( height ) => { // The screen is fullHeight or changing from fullScreen to the default mode if ( ( typeof currentHeight === 'string' && @@ -93,8 +93,8 @@ function BottomSheetNavigationContainer( { children, animate, main, theme } ) { return; } - if ( currentHeight !== height && height > 1 ) { - if ( animate && layout && currentHeight === 1 ) { + if ( height > 1 ) { + if ( currentHeight === 1 ) { setCurrentHeight( height ); } else if ( animate ) { performLayoutAnimation( ANIMATION_DURATION );