iou90 / react-native-autoheight-webview

An auto height webview for React Native
ISC License
492 stars 162 forks source link

Multiple AutoHeightWebView components on same screen #165

Closed deepak-jha-kgp closed 4 years ago

deepak-jha-kgp commented 4 years ago

Bug description: I have a use case where I need to render multiple AutoHeightWebViewcomponents within a single screen. But while doing so, I realized only the last component is getting rendered. If I pass height manually to the parent View component, I'm able to see the contents, but that defeats the purpose of this library for me. I've tried setting flex:1, alignItems: 'stretch' in both, parent View component and AutoHeightWebView but nothing seems to work if I don't set the height manually

To Reproduce:

<View style={{padding: 1}}> <AutoHeightWebView style={{width: 85*vw,alignItems:'stretch',}} source={{ html: html }} zoomable={false} /> </View> <View style={{padding: 1}}> <AutoHeightWebView style={{width: 85*vw,alignItems:'stretch'}} source={{ html: html }} zoomable={false} /> </View>

Source (static HTML or url): static HTML

Expected behavior:

Screenshots/Videos:

Environment:

iou90 commented 4 years ago

Please try to upgrade react-native-webview to the last version.

petkovv commented 3 years ago

@deepak-jha-kgp Updradeing worked?