mirror of
https://github.com/status-im/react-navigation.git
synced 2025-02-24 17:18:09 +00:00
Hide overflow on individual pages in tab view (#1271)
This commit is contained in:
parent
b532f8cc19
commit
b8dbbe964e
@ -1,7 +1,7 @@
|
|||||||
/* @flow */
|
/* @flow */
|
||||||
|
|
||||||
import React, { PureComponent } from 'react';
|
import React, { PureComponent } from 'react';
|
||||||
import { StyleSheet } from 'react-native';
|
import { View, StyleSheet } from 'react-native';
|
||||||
import { TabViewAnimated, TabViewPagerPan } from 'react-native-tab-view';
|
import { TabViewAnimated, TabViewPagerPan } from 'react-native-tab-view';
|
||||||
import SceneView from '../SceneView';
|
import SceneView from '../SceneView';
|
||||||
import withCachedChildNavigation from '../../withCachedChildNavigation';
|
import withCachedChildNavigation from '../../withCachedChildNavigation';
|
||||||
@ -62,11 +62,13 @@ class TabView extends PureComponent<void, Props, void> {
|
|||||||
route.routeName,
|
route.routeName,
|
||||||
);
|
);
|
||||||
return (
|
return (
|
||||||
<SceneView
|
<View style={styles.page}>
|
||||||
screenProps={screenProps}
|
<SceneView
|
||||||
component={TabComponent}
|
screenProps={screenProps}
|
||||||
navigation={childNavigation}
|
component={TabComponent}
|
||||||
/>
|
navigation={childNavigation}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -180,12 +182,15 @@ class TabView extends PureComponent<void, Props, void> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const TabViewEnhanced = withCachedChildNavigation(TabView);
|
export default withCachedChildNavigation(TabView);
|
||||||
|
|
||||||
export default TabViewEnhanced;
|
|
||||||
|
|
||||||
const styles = StyleSheet.create({
|
const styles = StyleSheet.create({
|
||||||
container: {
|
container: {
|
||||||
flex: 1,
|
flex: 1,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
page: {
|
||||||
|
flex: 1,
|
||||||
|
overflow: 'hidden',
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user