Skip to content

Commit

Permalink
Merge 6c6285e into 8ebfaef
Browse files Browse the repository at this point in the history
  • Loading branch information
Crayonn committed Mar 20, 2018
2 parents 8ebfaef + 6c6285e commit 7b0b4de
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/DefaultTabBar.native.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ export class DefaultTabBar extends React.PureComponent<PropsType, StateType> {
styles = defaultStyles,
tabsContainerStyle,
renderUnderline,
keyboardShouldPersistTaps,
} = this.props;

const tabUnderlineStyle = {
Expand Down Expand Up @@ -231,6 +232,7 @@ export class DefaultTabBar extends React.PureComponent<PropsType, StateType> {
bounces={false}
scrollsToTop={false}
scrollEnabled={tabs.length > page}
keyboardShouldPersistTaps={keyboardShouldPersistTaps}
>
<View
style={{
Expand Down
6 changes: 4 additions & 2 deletions src/Tabs.native.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export class Tabs extends Component<PropsType, StateType> {
}

renderContent = (getSubElements = this.getSubElements()) => {
const { tabs, usePaged, destroyInactiveTab } = this.props;
const { tabs, usePaged, destroyInactiveTab, keyboardShouldPersistTaps } = this.props;
const { currentTab = 0, containerWidth = 0 } = this.state;

const AnimatedScrollView = this.AnimatedScrollView;
Expand All @@ -85,6 +85,7 @@ export class Tabs extends Component<PropsType, StateType> {
directionalLockEnabled
alwaysBounceVertical={false}
keyboardDismissMode="on-drag"
keyboardShouldPersistTaps={keyboardShouldPersistTaps}
>
{
tabs.map((tab, index) => {
Expand Down Expand Up @@ -148,14 +149,15 @@ export class Tabs extends Component<PropsType, StateType> {
}

render() {
const { tabBarPosition, styles = Styles, noRenderContent } = this.props;
const { tabBarPosition, styles = Styles, noRenderContent, keyboardShouldPersistTaps } = this.props;
const { scrollX, scrollValue, containerWidth } = this.state;
// let overlayTabs = (this.props.tabBarPosition === 'overlayTop' || this.props.tabBarPosition === 'overlayBottom');
let overlayTabs = false;

let tabBarProps = {
...this.getTabBarBaseProps(),

keyboardShouldPersistTaps,
scrollX: scrollX,
scrollValue: scrollValue,
containerWidth: containerWidth,
Expand Down

0 comments on commit 7b0b4de

Please sign in to comment.