diff --git a/client/web/compose/src/components/Common/Grid.vue b/client/web/compose/src/components/Common/Grid.vue index 77f10f675..d5080a99a 100644 --- a/client/web/compose/src/components/Common/Grid.vue +++ b/client/web/compose/src/components/Common/Grid.vue @@ -120,9 +120,14 @@ export default { immediate: true, deep: true, handler (blocks) { - this.layout = blocks.map(({ meta, xywh: [x, y, w, h] }, i) => { - // To avoid collision with hidden elements - return meta.hidden ? { i, x: 0, y: 0, w: 0, h: 0 } : { i, x, y, w, h } + this.layout = [] + + // Next tick is important, otherwise it can lead to overlapping blocks + this.$nextTick(() => { + this.layout = blocks.map(({ meta, xywh: [x, y, w, h] }, i) => { + // To avoid collision with hidden elements + return meta.hidden ? { i, x: 0, y: 0, w: 0, h: 0 } : { i, x, y, w, h } + }) }) }, },