File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 11# [ Unreleased]
22
3+ ### Bug Fixes
4+
5+ - Fix double-tap on bottom tab not resetting navigation (V5/6) (#191 thanks @Whichoney )
6+
37# [ 3.1.2] ( https://github.com/IjzerenHein/react-navigation-shared-element/compare/v2.3.0...v3.1.2 ) (2021-08-19)
48
59### Features
Original file line number Diff line number Diff line change 88 StackActionHelpers ,
99 ParamListBase ,
1010 StackActions ,
11- EventArg
11+ EventArg ,
1212} from "@react-navigation/native" ;
1313import {
1414 CardAnimationContext ,
@@ -105,16 +105,16 @@ export default function createSharedElementStackNavigator<
105105
106106 React . useEffect (
107107 ( ) =>
108- navigation . addListener ?.( ' tabPress' , ( e ) => {
108+ navigation . addListener ?.( " tabPress" , ( e ) => {
109109 const isFocused = navigation . isFocused ( ) ;
110-
110+
111111 // Run the operation in the next frame so we're sure all listeners have been run
112112 // This is necessary to know if preventDefault() has been called
113113 requestAnimationFrame ( ( ) => {
114114 if (
115115 state . index > 0 &&
116116 isFocused &&
117- ! ( e as EventArg < ' tabPress' , true > ) . defaultPrevented
117+ ! ( e as EventArg < " tabPress" , true > ) . defaultPrevented
118118 ) {
119119 // When user taps on already focused tab and we're inside the tab,
120120 // reset the stack to replicate native behaviour
You can’t perform that action at this time.
0 commit comments