From 059952494394fd4481c53db77d3cdb800c2a4f19 Mon Sep 17 00:00:00 2001 From: Alain Dumesny Date: Wed, 7 May 2025 14:15:11 -0700 Subject: [PATCH] nested grid resizeToContentCBCheck() fix * make sure nested items size they parent item even when in batch mode (eg: load()) otherwise it never happens --- doc/CHANGES.md | 1 + src/gridstack.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/CHANGES.md b/doc/CHANGES.md index 1f550f92..8e79b166 100644 --- a/doc/CHANGES.md +++ b/doc/CHANGES.md @@ -129,6 +129,7 @@ Change log ## 12.1.1-dev (TBD) * fix [#3043](https://github.com/gridstack/gridstack.js/issues/3043) fix `opts.animate` again +* fix [#3047](https://github.com/gridstack/gridstack.js/pull/3047) nested grid resizeToContentCBCheck() fix ## 12.1.1 (2024-04-28) diff --git a/src/gridstack.ts b/src/gridstack.ts index 2b4007d6..913d1b47 100644 --- a/src/gridstack.ts +++ b/src/gridstack.ts @@ -1616,7 +1616,7 @@ export class GridStack { } // if we're a nested grid inside an sizeToContent item, tell it to resize itself too - if (parent && !parent.grid.engine.batchMode && Utils.shouldSizeToContent(parent)) { + if (parent && Utils.shouldSizeToContent(parent)) { parent.grid.resizeToContentCBCheck(parent.el); }