mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-24 09:28:31 +00:00
fix: filter hidden contens from grid render
This commit is contained in:
parent
ff56496c9f
commit
beac781596
1 changed files with 14 additions and 8 deletions
|
|
@ -77,14 +77,20 @@ export default function DragContainer({
|
|||
const moveableRef = useRef();
|
||||
const childMoveableRefs = useRef([]);
|
||||
const [movableTargets, setMovableTargets] = useState({});
|
||||
const boxList = boxes.map((box) => ({
|
||||
id: box.id,
|
||||
height: box?.layouts?.[currentLayout]?.height,
|
||||
left: box?.layouts?.[currentLayout]?.left,
|
||||
top: box?.layouts?.[currentLayout]?.top,
|
||||
width: box?.layouts?.[currentLayout]?.width,
|
||||
parent: box?.component?.parent,
|
||||
}));
|
||||
const boxList = boxes
|
||||
.filter(
|
||||
(box) =>
|
||||
box?.component?.definition?.others[currentLayout === 'mobile' ? 'showOnMobile' : 'showOnDesktop'].value ===
|
||||
'{{true}}'
|
||||
)
|
||||
.map((box) => ({
|
||||
id: box.id,
|
||||
height: box?.layouts?.[currentLayout]?.height,
|
||||
left: box?.layouts?.[currentLayout]?.left,
|
||||
top: box?.layouts?.[currentLayout]?.top,
|
||||
width: box?.layouts?.[currentLayout]?.width,
|
||||
parent: box?.component?.parent,
|
||||
}));
|
||||
const [list, setList] = useState(boxList);
|
||||
|
||||
console.log('draggedSubContainer => ', draggedSubContainer);
|
||||
|
|
|
|||
Loading…
Reference in a new issue