diff --git a/packages/react-navigation/src/views/TabView/TabView.js b/packages/react-navigation/src/views/TabView/TabView.js index 1ee5d42d..f5dd5a84 100644 --- a/packages/react-navigation/src/views/TabView/TabView.js +++ b/packages/react-navigation/src/views/TabView/TabView.js @@ -140,11 +140,15 @@ class TabView extends React.PureComponent { const tabBarVisible = options.tabBarVisible == null ? true : options.tabBarVisible; - const swipeEnabled = + let swipeEnabled = options.swipeEnabled == null ? this.props.swipeEnabled : options.swipeEnabled; + if (typeof swipeEnabled === 'function') { + swipeEnabled = swipeEnabled(state); + } + if (tabBarComponent !== undefined && tabBarVisible) { if (tabBarPosition === 'bottom') { renderFooter = this._renderTabBar;