From d29fb4f7f2d330abe541613eff3ce5abf1fb41b8 Mon Sep 17 00:00:00 2001 From: tobiu Date: Wed, 15 Jan 2025 20:29:44 +0100 Subject: [PATCH] grid.header.Toolbar: createItems() => prevent duplicate passSizeToView() calls #6242 --- src/grid/header/Toolbar.mjs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/grid/header/Toolbar.mjs b/src/grid/header/Toolbar.mjs index c68b8413b..92673cd07 100644 --- a/src/grid/header/Toolbar.mjs +++ b/src/grid/header/Toolbar.mjs @@ -106,7 +106,8 @@ class Toolbar extends BaseToolbar { * */ createItems() { - let me = this; + let me = this, + {mounted} = me; me.itemDefaults.showHeaderFilter = me.showHeaderFilters; @@ -130,7 +131,8 @@ class Toolbar extends BaseToolbar { }); me.promiseUpdate().then(() => { - me.mounted && me.passSizeToView() + // To prevent duplicate calls, we need to check the mounted state before the update call + mounted && me.passSizeToView() }) }