Skip to content

Commit

Permalink
grid.header.Toolbar: createItems() => prevent duplicate passSizeToVie…
Browse files Browse the repository at this point in the history
…w() calls #6242
  • Loading branch information
tobiu committed Jan 15, 2025
1 parent 9085a1a commit d29fb4f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/grid/header/Toolbar.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ class Toolbar extends BaseToolbar {
*
*/
createItems() {
let me = this;
let me = this,
{mounted} = me;

me.itemDefaults.showHeaderFilter = me.showHeaderFilters;

Expand All @@ -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()
})
}

Expand Down

0 comments on commit d29fb4f

Please sign in to comment.