primevue
primevue copied to clipboard
DynamicDialog: Underlying dialog not destroyed
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
- Open a dynamic dialog
- Close the dialog
- Open again
- First dialog is not visible anymore but custom style aren't removed from the DOM and the component is not unmounted
Expected behavior
- Open a dynamic dialog
- Close the dialog
- Every css styles are removed from the DOM and the dialog component is unmounted