Hi all,
I am having a little difficulty and can’t really find a solution. In Main UI I have an element on a page which opens a popup of a widget. However, I am trying to close the popup when an item is pressed. I have followed everything I can find without any luck.
The popupClose property comes directly from the F7 base element that the oh-label-card is built on top of. It is not a boolean value (true/false), but rather a string that holds a css selector which will uniquely identify the popup you want that element to close when it is interacted with.
If the popup you’re referring to is one that you’ve gotten the widget system to bring up (i.e., through the actionModal setting) then it will be difficult to uniquely identify the popup, but you can set a selector that should close just about any popup:
popupClose: .popup
or just about any modal that the UI brings up:
popupClose: .modal-in
If this is a popup that you’ve created yourself with the custom widget system, then just give your popup a unique class name and use that class name in the selector.
Thank you for the reply. I was going by what I could find on here but F7 is new to me so still trying to learn. I tried both of those options and neither seemed to have worked. I am currently opening them using this:
Is there a better way to call a widget for a popup? I was having a difficult time getting things to work properly when they were all in the same widget/page.
Okay, good news. So that demo worked so I tried it on another tab and was able to get it to work with oh-button. However, I think I have discovered the problem. It seems that the oh-label-card doesn’t seem to support the command. Which is odd you can open but not close a popup. Now I need to think of another option of a larger button . Thank you so much, I was starting to pull my hair out .