Skip to content

Commit 283518b

Browse files
sujameslinkelset
authored andcommitted
fix redirect bug in stacks in tab (react-navigation#2674)
1 parent 3a63950 commit 283518b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/routers/TabRouter.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,10 @@ export default (
239239
});
240240
// console.log(`${order.join('-')}: Processed other tabs:`, {lastIndex: state.index, index});
241241

242+
// keep active tab index if action type is SET_PARAMS
243+
index =
244+
action.type === NavigationActions.SET_PARAMS ? state.index : index;
245+
242246
if (index !== state.index || routes !== state.routes) {
243247
return {
244248
...state,

0 commit comments

Comments
 (0)