react-native-view-overflow icon indicating copy to clipboard operation
react-native-view-overflow copied to clipboard

Usage outside the ViewOverflow area

Open xiaweiss opened this issue 7 years ago • 1 comments

normal Useage image

<View style={{height: 200, backgroundColor: 'white'}}>
  <ViewOverflow style={{width: 200, height: 100, backgroundColor: 'pink'}}>
    <View style={{width: 100, height: 50, position: 'absolute', left: 100, bottom: -25, backgroundColor: 'yellow'}}>
        <View style={{backgroundColor: 'skyblue', height: '100%'}} />
    </View>
  </ViewOverflow>
</View>

let we set outside the ViewOverflow area bottom: -25 change to bottom: -50 image

to fixed it, we can replace View with ViewOverflow

<View style={{height: 200, backgroundColor: 'white'}}>
  <ViewOverflow style={{width: 200, height: 100, backgroundColor: 'pink'}}>
    <ViewOverflow style={{width: 100, height: 50, position: 'absolute', left: 100, bottom: -50, backgroundColor: 'yellow'}}>
        <View style={{backgroundColor: 'skyblue', height: '100%'}} />
    </ViewOverflow>
  </ViewOverflow>
</View>

now we can see it image

So,Usage outside the ViewOverflow area seems like:

<ViewOverflow>
    <ViewOverflow style={styles.absolute}>
        <ComponentContent />
    <ViewOverflow>
</ViewOverflow>

xiaweiss avatar May 08 '18 05:05 xiaweiss

Every View with overflowing area must have as parent another ViewOverflow component.

JCMais avatar May 08 '18 12:05 JCMais