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
Invoking a dialog reloads other components #42
Comments
Hi! It's srtange. Something happens with icon fonts in vuetify. What kind of vuetify icons do you use? For me is to complicated to understand reason without sufficient information or maybe reproducing example in codesandbox |
Are normal material design icons from Vuetify. For example: I need to make more experiments to be sure what the problem is, it's a kinda big nuxt project so would be hard to replicate on a sandbox but I will see what I can do. |
This would be good! You don't need to replicate all project. Just make an little instance in codesandbox. In my projects i haven’t seen this behaivour. But i use just material icons font |
And you wrote that showing dialog starts rerendering all page. But it doesn’t have to touch for updating not related components |
Lifecycle hooks don't run again. I tried putting some code on "Mounted" and it doesn't run when this happens. However, the loading bar in Nuxt (default on top of the app) does show for a brief moment even if i'm not navigating anywhere and Facebook pixel tells me I'm attemping to register a duplicate ID every time this happens. EDIT: I'm not positive on the loading bar thing. It happens when I use Axios, but might be a different side-effect. |
I've come to the conclusion that the problem module in this case is "nuxt-i18n" for internationalization. Using your lib is causing it to try to re-render the page. I wonder if I can configure it to avoid this. |
I managed to replicate problem with the minimum of files. |
Thank you, @ChibiChanNya for your work for replication. I've investigated this problem and:
Later I will study code of nuxt-i18n.seo |
Please read https://nuxt-community.github.io/nuxt-i18n/seo.html#improving-performance , it's better for perfomance set seo=false and then in each layout put code
because this code Look into lauouts/default.vue at https://codesandbox.io/s/vuetify-dialog-test-53ovx |
Thanks as always @yariksav , second time you save me. I really like this lib. Confirmed all good! |
Lately I came across a very weird issue when using your dialogs in my Nuxt project. Whenever I invoke a dialog to show up, the page attempts to reload other components, such as vuetify-icons, and it often fails. I'm not sure why this is happening since components are not re-mounted, but it looks like this:
BEFORE:
AFTER:
I had originally figured it would be some artifact from developer environment, but it happens in production as well. I have re-installed vuetify-dialog with latest version and using default settings and this continues to happen on any instance of invoking something to show up, for example:
Occasionally the icons return after a moment or two, but sometimes it just stays screwed up like that.
It doesn't affect just icons, as it attempts to reload header scripts like google tag manager, facebook pixel, etc.
The text was updated successfully, but these errors were encountered: