Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 0 additions & 7 deletions src/components/grid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -410,13 +410,6 @@ export class IgcGridLite<T extends object> extends EventEmitterBase<IgcGridLiteE
);
}

/**
* Updates the column configuration of the grid.
*/
public updateColumns(columns: ColumnConfiguration<T> | ColumnConfiguration<T>[]): void {
this._stateController.updateColumnsConfiguration(asArray(columns));
}

@eventOptions({ capture: true })
protected _bodyClickHandler(event: PointerEvent): void {
const target = getElementFromEventPath<IgcGridLiteCell<T>>(IgcGridLiteCell.tagName, event);
Expand Down
9 changes: 7 additions & 2 deletions test/utils/grid-fixture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -194,7 +195,11 @@ export default class GridTestFixture<T extends object> {
}

public async updateColumns(columns: ColumnConfiguration<T> | ColumnConfiguration<T>[]) {
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);
Comment thread
damyanpetev marked this conversation as resolved.
elem && Object.assign(elem, col);
Comment thread
damyanpetev marked this conversation as resolved.
}
await this.waitForUpdate();
return this;
}
Expand Down