Skip to content

Commit

Permalink
fix: navigation bottom tabs (#3656)
Browse files Browse the repository at this point in the history
  • Loading branch information
ByteZhang1024 authored Oct 16, 2023
1 parent f41e635 commit d600ffd
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions patches/@react-navigation+bottom-tabs+6.5.9.patch
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
diff --git a/node_modules/@react-navigation/bottom-tabs/lib/module/views/BottomTabView.js b/node_modules/@react-navigation/bottom-tabs/lib/module/views/BottomTabView.js
index 2b0dc1c..710697b 100644
index 2b0dc1c..4d55161 100644
--- a/node_modules/@react-navigation/bottom-tabs/lib/module/views/BottomTabView.js
+++ b/node_modules/@react-navigation/bottom-tabs/lib/module/views/BottomTabView.js
@@ -17,7 +17,6 @@ export default function BottomTabView(props) {
detachInactiveScreens = Platform.OS === 'web' || Platform.OS === 'android' || Platform.OS === 'ios',
sceneContainerStyle
} = props;
- const focusedRouteKey = state.routes[state.index].key;
const [loaded, setLoaded] = React.useState([focusedRouteKey]);
if (!loaded.includes(focusedRouteKey)) {
setLoaded([...loaded, focusedRouteKey]);
@@ -53,7 +52,14 @@ export default function BottomTabView(props) {
@@ -53,7 +53,14 @@ export default function BottomTabView(props) {
const {
routes
} = state;
Expand All @@ -26,7 +18,7 @@ index 2b0dc1c..710697b 100644
enabled: detachInactiveScreens,
hasTwoStates: true,
style: styles.container
@@ -120,6 +126,12 @@ const styles = StyleSheet.create({
@@ -120,6 +127,12 @@ const styles = StyleSheet.create({
container: {
flex: 1,
overflow: 'hidden'
Expand Down

0 comments on commit d600ffd

Please sign in to comment.