primeng
primeng copied to clipboard
Reimplement OverlayPanel Visibility
Instead of hide/show with css display property use *ngIf so when it gets visible, dialog dom should be created and similarly gets removed from dom when it is not visible. This will keep the dom size small as dialogs will work in a lazy manner and only exist in dom when they are visible.
There is a defect related to this change which has been logged here: https://github.com/primefaces/primeng/issues/6180
When an overlay panel or dialog which is appended to body is destroyed without being displayed, the container is never set and causes an exception.