Skip to content

Commit b3794ed

Browse files
authored
docs: add entry for the declarative columns change (#13)
1 parent 37c7886 commit b3794ed

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

CHANGELOG.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,41 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
### Changed
1313

14+
- **BREAKING:** Column configuration is now declarative using `<igc-grid-lite-column>` elements instead of the `columns` property.
15+
The `columns` property is now read-only and returns the current column configuration.
16+
17+
Before:
18+
19+
```html
20+
<igc-grid-lite .data=${data} .columns=${columns}></igc-grid-lite>
21+
```
22+
23+
```ts
24+
const columns: ColumnConfiguration<User>[] = [
25+
{ key: 'id', headerText: 'User ID', type: 'number', filter: true, sort: true },
26+
{ key: 'name', filter: true, sort: true },
27+
];
28+
```
29+
30+
After:
31+
32+
```html
33+
<igc-grid-lite .data=${data}>
34+
<igc-grid-lite-column
35+
key="id"
36+
header-text="User ID"
37+
type="number"
38+
.filter=${true}
39+
.sort=${true}
40+
></igc-grid-lite-column>
41+
<igc-grid-lite-column
42+
key="name"
43+
.filter=${true}
44+
.sort=${true}
45+
></igc-grid-lite-column>
46+
</igc-grid-lite>
47+
```
48+
1449
- **BREAKING:** Renamed `GridSortConfiguration` type to `GridLiteSortingOptions`.
1550
- **BREAKING:** Renamed `IgcGridLite.sortConfiguration` property to `sortingOptions`.
1651
- **BREAKING:** Renamed `IgcGridLite.sortExpressions` property to `sortingExpressions`.

0 commit comments

Comments
 (0)