From 0526d57c0c7c8ba3442a0f1b729324d29a9bac82 Mon Sep 17 00:00:00 2001 From: Shaurya Sharma <79473274+shaurya-sharma064@users.noreply.github.com> Date: Wed, 31 Jul 2024 15:37:29 +0530 Subject: [PATCH] fix/grid-to-list (#10522) --- frontend/src/Editor/Container.jsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/src/Editor/Container.jsx b/frontend/src/Editor/Container.jsx index 7a0a9804eb..8ff3e7af59 100644 --- a/frontend/src/Editor/Container.jsx +++ b/frontend/src/Editor/Container.jsx @@ -588,12 +588,16 @@ export const Container = ({ if (parent) { const parentElem = document.getElementById(`canvas-${parent}`); const parentId = copyOfBoxes[parent] ? parent : parent?.split('-').slice(0, -1).join('-'); - const compoenentType = copyOfBoxes[parentId]?.component.component; + const componentType = copyOfBoxes[parentId]?.component.component; var parentHeight = parentElem?.clientHeight || _height; - if (_height > parentHeight && ['Tabs', 'Listview'].includes(compoenentType)) { + if (_height > parentHeight && ['Tabs', 'Listview'].includes(componentType)) { _height = parentHeight; y = 0; } + + if (componentType === 'Listview' && y > parentHeight) { + y = y % parentHeight; + } } const componentData = JSON.parse(JSON.stringify(copyOfBoxes[id]['component']));