react-native-segmented-control-tab icon indicating copy to clipboard operation
react-native-segmented-control-tab copied to clipboard

Ability to scroll tabs while tabs count is greater then 10

Open ManojSolanki opened this issue 5 years ago • 4 comments

Please suggest to me how to make tabs scrollable, In my case tab count is greater than 10.

ManojSolanki avatar Sep 26 '19 07:09 ManojSolanki

I have a similar question

Jmzp avatar Dec 20 '19 23:12 Jmzp

Yes please, can we have this? A scrollable option

dayaki avatar Jan 30 '20 11:01 dayaki

Yes please make it as a prop. it will be very helpful

MrOttimista avatar Apr 04 '20 14:04 MrOttimista

Thank you, PR appreciated

kirankalyan5 avatar May 06 '20 07:05 kirankalyan5

I figured it out by wrapping tabs into horizontal ScrollView. Hope it helps you guys.

<ScrollView
        showsVerticalScrollIndicator={false}
        showsHorizontalScrollIndicator={false}
        nestedScrollEnabled={false}
        horizontal
      >
        <SegmentedControlTab
          values={['First', 'Second', 'Third', 'Four', 'Five', 'Six']}
          selectedIndex={selectedIndex}
          onTabPress={setSelectedIndex}
          tabStyle={styles.tabStyle}
        />
      </ScrollView>

const styles = StyleSheet.create({
  tabStyle: {
    width: 100,
  },
});

radekzz avatar Dec 20 '22 14:12 radekzz