-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drawer : Template is always totaly build #6559
Comments
You could put the Drawer inside your component, instead of the other way around. |
Are you sure it helps? The idea is to create the drawer content only once at first visible =true. Now you recreate content everytime visibility go from false to true |
From my point of view:
v-if="visible" is an error. Must be something like "visible || wasAlreadyOpened"... Everytime visible change from true to false, the content is removed... and everything is rebuild when visible = true again. Is there a workarround for this behavior ? |
Describe the bug
Hello,
Seems that Drawer is totaly rebuild every time I change the v-model:visible attribute. Is there a way to just build it the first time and show / hide it next time ?
Reproducer
https://stackblitz.com/edit/qkuurx?file=src%2FApp.vue
PrimeVue version
4.1.0
Vue version
4.x
Language
TypeScript
Build / Runtime
Vue CLI App
Browser(s)
All
Steps to reproduce the behavior
Just pu an alert inside the Drawer component, every time I change his visibility, the alert will fire.
Expected behavior
I think it will be good to build the content only once.. is there a way to do that ?
THanks for your support
The text was updated successfully, but these errors were encountered: