0

I am trying something with ScrollView but I found that no matter what the height is provided in style to ScrollView, it is occupying its parent entirely. What is the issue with ScrollView?

<View style={{ width: 200, height: 250 }}>
    <ScrollView style={{ width: '100%', height: 48, backgroundColor: 'purple' }} horizontal={false}>

    </ScrollView>
</View>

Its a sample code and scrollview takes space of 200 - 250 dimension. react-native: 0.59.8

1 Answers1

0

doing width: '100%' inside scrollview will cover full width of mobile phone

try to remove width: '100%'

Nikhil bhatia
  • 1,297
  • 1
  • 8
  • 9