diff --git a/packages/react-navigation/docs/api/navigators/TabNavigator.md b/packages/react-navigation/docs/api/navigators/TabNavigator.md index 5f68adf8..7660cd87 100644 --- a/packages/react-navigation/docs/api/navigators/TabNavigator.md +++ b/packages/react-navigation/docs/api/navigators/TabNavigator.md @@ -88,7 +88,6 @@ The route configs object is a mapping from route name to a route config, which t - `swipeEnabled` - Whether to allow swiping between tabs. - `animationEnabled` - Whether to animate when changing tabs. - `configureTransition` - a function that, given `currentTransitionProps` and `nextTransitionProps`, returns a configuration object that describes the animation between tabs. -- `lazy` - Whether to lazily render tabs as needed as opposed to rendering them upfront. - `initialLayout` - Optional object containing the initial `height` and `width`, can be passed to prevent the one frame delay in [react-native-tab-view](https://github.com/react-native-community/react-native-tab-view#avoid-one-frame-delay) rendering. - `tabBarOptions` - Configure the tab bar, see below. diff --git a/packages/react-navigation/examples/NavigationPlayground/yarn.lock b/packages/react-navigation/examples/NavigationPlayground/yarn.lock index 6c7627d7..155f4449 100644 --- a/packages/react-navigation/examples/NavigationPlayground/yarn.lock +++ b/packages/react-navigation/examples/NavigationPlayground/yarn.lock @@ -4617,11 +4617,11 @@ react-native-scripts@^1.5.0: color "^2.0.1" lodash "^4.16.6" -react-native-tab-view@^0.0.70: - version "0.0.70" - resolved "https://registry.yarnpkg.com/react-native-tab-view/-/react-native-tab-view-0.0.70.tgz#1dd2ded32acd0cb6bfef38d26e53675db733b37b" +react-native-tab-view@^0.0.74: + version "0.0.74" + resolved "https://registry.yarnpkg.com/react-native-tab-view/-/react-native-tab-view-0.0.74.tgz#62c0c882d9232b461ce181d440d683b4f99d1bd8" dependencies: - prop-types "^15.5.10" + prop-types "^15.6.0" react-native-vector-icons@4.4.2: version "4.4.2" @@ -4698,7 +4698,7 @@ react-native@^0.51.0: path-to-regexp "^1.7.0" prop-types "^15.5.10" react-native-drawer-layout-polyfill "^1.3.2" - react-native-tab-view "^0.0.70" + react-native-tab-view "^0.0.74" react-proxy@^1.1.7: version "1.1.8" diff --git a/packages/react-navigation/package.json b/packages/react-navigation/package.json index d87d4275..3dc55724 100644 --- a/packages/react-navigation/package.json +++ b/packages/react-navigation/package.json @@ -55,7 +55,7 @@ "path-to-regexp": "^1.7.0", "prop-types": "^15.5.10", "react-native-drawer-layout-polyfill": "^1.3.2", - "react-native-tab-view": "^0.0.70" + "react-native-tab-view": "^0.0.74" }, "devDependencies": { "babel-cli": "^6.24.1", diff --git a/packages/react-navigation/src/navigators/TabNavigator.js b/packages/react-navigation/src/navigators/TabNavigator.js index 6c39af91..d59c07e4 100644 --- a/packages/react-navigation/src/navigators/TabNavigator.js +++ b/packages/react-navigation/src/navigators/TabNavigator.js @@ -49,7 +49,6 @@ const TabNavigator = ( swipeEnabled, animationEnabled, configureTransition, - lazy, initialLayout, ...tabsConfig } = mergedConfig; @@ -70,7 +69,6 @@ const TabNavigator = ( swipeEnabled={swipeEnabled} animationEnabled={animationEnabled} configureTransition={configureTransition} - lazy={lazy} initialLayout={initialLayout} /> )); @@ -84,7 +82,6 @@ const Presets = { tabBarPosition: 'bottom', swipeEnabled: false, animationEnabled: false, - lazy: false, initialLayout: undefined, }, AndroidTopTabs: { @@ -92,7 +89,6 @@ const Presets = { tabBarPosition: 'top', swipeEnabled: true, animationEnabled: true, - lazy: false, initialLayout: undefined, }, }; diff --git a/packages/react-navigation/src/views/TabView/TabView.js b/packages/react-navigation/src/views/TabView/TabView.js index 10ed7698..62eb73f8 100644 --- a/packages/react-navigation/src/views/TabView/TabView.js +++ b/packages/react-navigation/src/views/TabView/TabView.js @@ -26,7 +26,6 @@ export type TabViewConfig = { currentTransitionProps: Object, nextTransitionProps: Object ) => Object, - lazy?: boolean, initialLayout?: Layout, }; @@ -47,7 +46,6 @@ type Props = { currentTransitionProps: Object, nextTransitionProps: Object ) => Object, - lazy?: boolean, initialLayout: Layout, screenProps?: {}, @@ -171,7 +169,6 @@ class TabView extends React.PureComponent { tabBarPosition, animationEnabled, configureTransition, - lazy, initialLayout, screenProps, } = this.props; @@ -210,7 +207,6 @@ class TabView extends React.PureComponent { } const props = { - lazy, initialLayout, animationEnabled, configureTransition, @@ -225,7 +221,6 @@ class TabView extends React.PureComponent { style: styles.container, }; - // $FlowFixMe: mismatch with react-native-tab-view type return ; } } diff --git a/packages/react-navigation/src/views/__tests__/__snapshots__/TabView-test.js.snap b/packages/react-navigation/src/views/__tests__/__snapshots__/TabView-test.js.snap index 41bf8a5f..7f3877c3 100644 --- a/packages/react-navigation/src/views/__tests__/__snapshots__/TabView-test.js.snap +++ b/packages/react-navigation/src/views/__tests__/__snapshots__/TabView-test.js.snap @@ -134,7 +134,7 @@ exports[`TabBarBottom renders successfully 1`] = ` bounces={false} contentContainerStyle={ Object { - "flexGrow": 1, + "flex": 1, } } contentOffset={ @@ -164,9 +164,10 @@ exports[`TabBarBottom renders successfully 1`] = ` onTouchEnd={[Function]} onTouchMove={[Function]} onTouchStart={[Function]} + overScrollMode="never" pagingEnabled={true} scrollEnabled={undefined} - scrollEventThrottle={16} + scrollEventThrottle={1} scrollsToTop={false} sendMomentumEvents={true} showsHorizontalScrollIndicator={false} @@ -179,7 +180,7 @@ exports[`TabBarBottom renders successfully 1`] = ` "overflow": "scroll", }, Object { - "flexGrow": 1, + "flex": 1, }, ] } @@ -193,7 +194,7 @@ exports[`TabBarBottom renders successfully 1`] = ` "flexDirection": "row", }, Object { - "flexGrow": 1, + "flex": 1, }, ] } diff --git a/packages/react-navigation/yarn.lock b/packages/react-navigation/yarn.lock index 7b122bee..6edd200e 100644 --- a/packages/react-navigation/yarn.lock +++ b/packages/react-navigation/yarn.lock @@ -4488,11 +4488,11 @@ react-native-drawer-layout@1.3.2: dependencies: react-native-dismiss-keyboard "1.0.0" -react-native-tab-view@^0.0.70: - version "0.0.70" - resolved "https://registry.yarnpkg.com/react-native-tab-view/-/react-native-tab-view-0.0.70.tgz#1dd2ded32acd0cb6bfef38d26e53675db733b37b" +react-native-tab-view@^0.0.74: + version "0.0.74" + resolved "https://registry.yarnpkg.com/react-native-tab-view/-/react-native-tab-view-0.0.74.tgz#62c0c882d9232b461ce181d440d683b4f99d1bd8" dependencies: - prop-types "^15.5.10" + prop-types "^15.6.0" react-native-vector-icons@^4.2.0: version "4.4.2"