framework7io / framework7

Full featured HTML framework for building iOS & Android apps
http://framework7.io
MIT License
18.06k stars 3.23k forks source link

Condition render popup in React backdrop not showing #4089

Closed vitalijalbu closed 1 year ago

vitalijalbu commented 1 year ago

Backdrop is not showing if displaying conditionally (setstate true or false) popup component. If display it normally all is ok, but if doing

{StateOpended && (<Popup opened />)} backdrop is not showing, only the popup. Source forum: https://forum.framework7.io/t/condition-render-popup-in-react-backdrop-not-showing/15757

[CodeSandbox – 24 Oct 22]()

Describe the bug

{StateOpended && (<Popup opened />)} backdrop is not showing, only the popup.

nolimits4web commented 1 year ago

Popup state must be toggled by using opened prop, otherwise even on popup close it won't be able to destroy itself on close