vue-responsive-grid-layout
vue-responsive-grid-layout copied to clipboard
Re-rendering the layout doesn't seem to work
Expected Behavior
I need to re-render the grid when a component is mounted. To do this I have a very simple component as follows and I expect it to simply re-render the entire grid.
<grid-layout
ref="gridLayout"
v-model:layout="layout"
....
mounted() {
// Tried this
this.$refs.gridLayout.onWindowResize();
// And this
this.$refs.gridLayout.$forceUpdate();
}
Current Behavior
When using onWindowResize it throws an error: TypeError: this.$refs.gridLayout.onWindowResize is not a function which I guess makes sense since Vue 3 doesn't seem to support it.
Failure Information (for bugs)
I am using Vue 3.3.8 and the 1.2.6 of this package on node 20.10.0 and npm 10.2.3.
Essentially I am trying to find a way to programatically re-render the grid if thats possible? Thanks.
As you discovered there is no support for this currently. I'll add this as a feature request and see how soon this can implemented.