mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-23 17:08:34 +00:00
Fixed layout reset while switching layouts
This commit is contained in:
parent
03a71a6352
commit
18e8e172c5
1 changed files with 15 additions and 10 deletions
|
|
@ -204,17 +204,22 @@ export const Container = ({
|
|||
width = width + deltaWidth;
|
||||
height = height + deltaHeight;
|
||||
|
||||
setBoxes(
|
||||
update(boxes, {
|
||||
[id]: {
|
||||
$merge: {
|
||||
layouts: {
|
||||
[currentLayout]: { width, height, top, left }
|
||||
}
|
||||
}
|
||||
let newBoxes = {
|
||||
...boxes,
|
||||
[id]: {
|
||||
...boxes[id],
|
||||
layouts: {
|
||||
...boxes[id]['layouts'],
|
||||
[currentLayout]: {
|
||||
...boxes[id]['layouts'][currentLayout],
|
||||
width, height, top, left
|
||||
}
|
||||
}
|
||||
})
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
setBoxes(newBoxes);
|
||||
}
|
||||
|
||||
function paramUpdated(id, param, value) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue