primevue icon indicating copy to clipboard operation
primevue copied to clipboard

DynamicDialog: Underlying dialog not destroyed

Open YannisJustine opened this issue 4 months ago • 0 comments

Describe the bug

Closing a DynamicDialog does not destroy the underlying Dialog component. It does, however, multiply the number of css styles associated with dialog. Old dialogs are no longer visible, but they are not destroyed.

Reproducer

https://stackblitz.com/edit/primevue-4-vite-issue-template-safmim?file=src%2FApp.vue

PrimeVue version

4.1.0

Vue version

4.x

Language

ALL

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

  1. Open a dynamic dialog
  2. Close the dialog
  3. Open again
  4. First dialog is not visible anymore but custom style aren't removed from the DOM and the component is not unmounted

Expected behavior

  1. Open a dynamic dialog
  2. Close the dialog
  3. Every css styles are removed from the DOM and the dialog component is unmounted

YannisJustine avatar Oct 07 '24 16:10 YannisJustine