You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .changeset/module-ag-grid_theme-function.md
+8-9Lines changed: 8 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,20 +2,19 @@
2
2
"@equinor/fusion-framework-module-ag-grid": minor
3
3
---
4
4
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.
6
6
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.
8
8
9
9
```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= {
17
12
theme: () =>myTheme
18
13
};
14
+
15
+
// Builder API remains backward compatible
16
+
builder.setTheme(myTheme); // still works
17
+
builder.setTheme((theme) =>theme.withParams({...})); // also works
0 commit comments