vue-grid-layout
vue-grid-layout copied to clipboard
Components render repeatedly when window size is changed
Software version (please complete the following information):
- Browser [e.g. chrome, safari]
- Vue Version [^3.2.39]
- vue-grid-layout Version: [^3.0.0-beta1]
Describe the bug Components render repeatedly when window size is changed,api interfaces in components to be called multiple times
To Reproduce 1.F12 2.change the window size
Expected behavior Components do not re render when changing the window size
Screenshots
Additional context Add any other context about the problem here.
I'm not sure this is related to vue-grid-layout. It looks to me whenever the viewport is resized, the dynamic component executes loadComponent()
. While I saw loadComponent()
triggered multiple times as I dragged the window size around, I could not trigger any lifecycle hooks on the component.
Is it possible your issue is unrelated to vue-grid-component
and instead due to <component :is>
itself constantly calling your function?
I'm not sure this is related to vue-grid-layout. It looks to me whenever the viewport is resized, the dynamic component executes
loadComponent()
. While I sawloadComponent()
triggered multiple times as I dragged the window size around, I could not trigger any lifecycle hooks on the component.Is it possible your issue is unrelated to
vue-grid-component
and instead due to<component :is>
itself constantly calling your function?
Thank you for reminding me. I did a test, but the problem still exists.....
Can you send me a codepen or something where this issue occurs?
Can you send me a codepen or something where this issue occurs?
https://codesandbox.io/embed/unruffled-architecture-onn9sr
OK. I can actually see it. The components are definitely not re-rendering, but every time a resize event gets triggered. I'll see if I can figure something out.