fix/grid-to-list (#10522)

This commit is contained in:
Shaurya Sharma 2024-07-31 15:37:29 +05:30 committed by GitHub
parent f405d3db74
commit 0526d57c0c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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']));