Skip to content

Commit caff666

Browse files
odinrCopilot
andauthored
Update .changeset/module-ag-grid_theme-function.md
Co-authored-by: Copilot <[email protected]>
1 parent 09286b4 commit caff666

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

.changeset/module-ag-grid_theme-function.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,19 @@
22
"@equinor/fusion-framework-module-ag-grid": minor
33
---
44

5-
Change `theme` configuration from direct `Theme` value to function `() => Theme` for lazy evaluation.
5+
Internal: `theme` config property now expects a function `() => Theme` for lazy evaluation, but consumer APIs remain backward compatible.
66

7-
The `theme` property in `AgGridConfig` now accepts a function that returns a `Theme` instead of a `Theme` directly. This enables dynamic theme evaluation and better integration with theme systems.
7+
Most consumers using `builder.setTheme()` do not need to migrate; it still accepts both `Theme` objects and functions. Only direct construction of `AgGridConfig` requires the function wrapper.
88

99
```typescript
10-
// Before
11-
const config = {
12-
theme: myTheme
13-
};
14-
15-
// After
16-
const config = {
10+
// Internal API change (rare, direct config construction)
11+
const config: AgGridConfig = {
1712
theme: () => myTheme
1813
};
14+
15+
// Builder API remains backward compatible
16+
builder.setTheme(myTheme); // still works
17+
builder.setTheme((theme) => theme.withParams({...})); // also works
1918
```
2019

2120
Fixes: https://github.com/equinor/fusion-framework/issues/747

0 commit comments

Comments
 (0)