Skip to content

Enabling scroll on the tab navigation with TabNavigator. #1897

@siddhism

Description

@siddhism

Current Behavior

providing scrollEnabled : true in TabNavigator doesn't make the tab bar scrollable.

export const Tabs = TabNavigator({
    all: {
      screen: TopicsFlatList,
      navigationOptions: {
        tabBarLabel: 'Feed',
        tabBarIcon: ({ tintColor }) => <Icon name="list" size={35} color={tintColor} />,
      },
    },
    world: {
      screen: TopicsFlatList,
      navigationOptions: {
        tabBarLabel: 'world',
        tabBarIcon: ({ tintColor }) => <Icon name="account-circle" size={35} color={tintColor} />
      },
    },
    // .... more categories here
},{
  'lazy': true,
  'scrollEnabled': true,
  'tabStyle': {
      width: 60
    },
  },
);

Expected Behavior

Tab bar should be scrollable.

related discussions :
#86
#133 (comment)

Here is how it looks

image

Your Environment

software version
react-navigation ^1.0.0-beta.11
react-native ^0.44.0
node v6.10.0
npm or yarn 4.1.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions