diff --git a/CHANGELOG.md b/CHANGELOG.md index ce1c579..27e5a98 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 > **Note:** This project is currently in initial development (0.0.x versions). Until version 1.0.0 is released, the public API is not considered stable and breaking changes may occur in any release without following semantic versioning conventions. +## [0.3.1] - 2025-12-12 + +### Changed + +- **BREAKING:** Removed `updateColumns` method as declarative columns can be updated directly now. + ## [0.3.0] - 2025-12-11 ### Changed diff --git a/src/components/grid.ts b/src/components/grid.ts index 8d6a018..575d1ab 100644 --- a/src/components/grid.ts +++ b/src/components/grid.ts @@ -410,13 +410,6 @@ export class IgcGridLite extends EventEmitterBase | ColumnConfiguration[]): void { - this._stateController.updateColumnsConfiguration(asArray(columns)); - } - @eventOptions({ capture: true }) protected _bodyClickHandler(event: PointerEvent): void { const target = getElementFromEventPath>(IgcGridLiteCell.tagName, event); diff --git a/test/utils/grid-fixture.ts b/test/utils/grid-fixture.ts index ac81c61..8148019 100644 --- a/test/utils/grid-fixture.ts +++ b/test/utils/grid-fixture.ts @@ -3,8 +3,9 @@ import IgcFilterRow from '../../src/components/filter-row.js'; import { IgcGridLite } from '../../src/components/grid.js'; import IgcGridLiteHeaderRow from '../../src/components/header-row.js'; import IgcVirtualizer from '../../src/components/virtualizer.js'; +import { GRID_COLUMN_TAG } from '../../src/internal/tags.js'; import type { ColumnConfiguration, Keys } from '../../src/internal/types.js'; -import { isNumber } from '../../src/internal/utils.js'; +import { asArray, isNumber } from '../../src/internal/utils.js'; import type { FilterExpression } from '../../src/operations/filter/types.js'; import type { SortingExpression } from '../../src/operations/sort/types.js'; import type CellTestFixture from './cell-fixture.js'; @@ -194,7 +195,11 @@ export default class GridTestFixture { } public async updateColumns(columns: ColumnConfiguration | ColumnConfiguration[]) { - this.grid.updateColumns(columns); + const colElements = Array.from(this.grid.querySelectorAll(GRID_COLUMN_TAG)); + for (const col of asArray(columns)) { + const elem = colElements.find((x) => x.field === col.field); + elem && Object.assign(elem, col); + } await this.waitForUpdate(); return this; }