react-native-popover-view: Error while wrapping the PopOver inside a Text element
<Text> <Text style={styles.sectionTitle} onPress={() => this.setState({isVisible: true})} ref={(ref) => (this.touchable = ref)}> Click here to show PopOver </Text> <View style={styles.popover}> <Popover isVisible={this.state.isVisible} fromView={this.touchable} placement={'bottom'} onRequestClose={() => this.closePopover()}> <Text>ReactNativePopOverViewSuccessfull</Text> </Popover> </View> </Text>
code shown above is from my poc . In my actual project all of my components are dynamically created and i need to show popover to a particular text component, so i tried wrapping up the popover inside the text component but it fires error while clicking the text component
Device/Setup Info:
- OS: Android 10
react-nativeversion: 0.61.5react-native-popover-viewversion: 2.1.0
Screenshots
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (8 by maintainers)
@krakzk Which issue are you having? The library API has changed significantly since this issue was closed, so the solution may not be the same on the latest version.
@abinnellithanam how did you fix? Asking to help future people with same issue.