0

I have Question is i want to disable scroll of one item from inside two scroll view like as

<ScrollView horizontal={true}>    ////Horizontal ScrollView
  <ScrollView>                     ////Vertical ScrollView
    <View />            //// View 1
    <View />           //// View 2
  </ScrollView>
</ScrollView>

i just want to apply only Vertical scrollView on view 1 not Horizontal

Any one help me how i can achieve this.

Mirza Hayat
  • 284
  • 5
  • 11

2 Answers2

0

please use this for disable scrolling

scrollEnabled={false}

vivaan
  • 26
  • 7
  • bro i just want to remove View 1 from horizontal scroll view ,and vertical scrollview will apply on it, this props will disable overall scrollview on centent. – Mirza Hayat Sep 13 '21 at 11:39
  • can you able to show ui ? then please share it so I can get the idea – vivaan Sep 13 '21 at 11:44
  • UI it look like as Table top and left header data, when the user vertical scroll the top header will sticky and when user horizontal scroll then left header will sticky, Its Main overView. – Mirza Hayat Sep 13 '21 at 12:15
  • @mirzahayat please use createMaterialTopTabNavigator function of react-navigation or any materialtoptabbar for tab check this link as well https://reactnavigation.org/docs/material-top-tab-navigator/ – vivaan Sep 13 '21 at 12:25
0

i have found an answer, we can handle it with ref , check for demo link https://snack.expo.dev/@mirza009/table

Mirza Hayat
  • 284
  • 5
  • 11