From b05cfbfa61e9dc377d0987bff190469c324a9830 Mon Sep 17 00:00:00 2001 From: Hauke Ingwersen Date: Fri, 19 Jan 2024 10:12:11 +0100 Subject: [PATCH] Filter column events by finished and source Filter the source addionally by event type --- ag-grid-webcomponent/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ag-grid-webcomponent/index.js b/ag-grid-webcomponent/index.js index 1ed51d3..5e10a99 100755 --- a/ag-grid-webcomponent/index.js +++ b/ag-grid-webcomponent/index.js @@ -340,6 +340,9 @@ class AgGrid extends HTMLElement { columnEvents.map((event) => this._addEventHandler(event, "columnEvents", function (params) { + // sizeColumnsToFit will be dispatched when the grid is scrolled horizontally + if (!params.finished || (params.type == "columnResized" && params.source == "sizeColumnsToFit")) { return } + const stateChangeEvent = columnStateChangedEvent( params, params.columnApi.getColumnState()