I am new to react I use f7 v3 and I want to open a popup from a listItem
I have 2 issues,
- call function from listitem
- open a popup from code
or just open it from listItem if possible
In React, I can open a popup from a button using this -> popupOpen="#popup" and I dont know why its not directly supported in listItem,
I though to call a function and open it inside the function
In order to call the function, I tried both click=‘openPopupSettings()’ and click={this.openPopupSettings()}
when I use click={this.openPopupSettings()} initially call function and logs trying
here is the html
<List>
<ListItem click={this.openPopupSettings()} title="Settings"></ListItem>
here is the code
export default class extends React.Component {
openPopupLanguage() {
console.log('trying')
//this.$f7.popup.open(popup, true)
}
render () {
return (
second issue is opening the poup
normlay this works on f7 vue = > this.$f7.popup.open(popup, true)
but react gives error for popup , I defined popup in same component
and here is the popup code
<Popup id="popup">
<View>
<Page>
<Navbar title="Language Settings">
<NavRight>
<Link popupClose>Close</Link>
</NavRight>
</Navbar>
<Block>Lorem ipsum dolor sit amet</Block>
</Page>
</View>
</Popup>