From c24687dc493d5594ce693310761d945795c674bf Mon Sep 17 00:00:00 2001 From: Lukas Zeiml Date: Tue, 28 Oct 2025 16:13:39 +0100 Subject: [PATCH 1/2] add additional info --- docs/components/grid/code.mdx | 15 ++++++++++++--- docs/home/migration/4_0_0/index.md | 13 +++++++++++-- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/docs/components/grid/code.mdx b/docs/components/grid/code.mdx index 32ddc98f..537b7889 100644 --- a/docs/components/grid/code.mdx +++ b/docs/components/grid/code.mdx @@ -37,13 +37,22 @@ npm install @siemens/ix-aggrid Import and configure the IX theme: ```javascript -import { useIxTheme } from '@siemens/ix-aggrid'; +import { getIxTheme } from '@siemens/ix-aggrid'; import { provideGlobalGridOptions } from 'ag-grid-community'; -const ixTheme = await useIxTheme(() => import('ag-grid-community')); +// Get iX theme based on your ag-grid module +const ixTheme = await getIxTheme(() => import('ag-grid-community')); +// Set the theme in your grid options +const gridOptions = { + theme: ixTheme, + // Rest of options +} + +// Or set the theme globally for all grids +// Make sure to do this before initializing any grid provideGlobalGridOptions({ - theme: ixTheme + theme: ixTheme, }); ``` diff --git a/docs/home/migration/4_0_0/index.md b/docs/home/migration/4_0_0/index.md index 76c8aa5d..9944f841 100644 --- a/docs/home/migration/4_0_0/index.md +++ b/docs/home/migration/4_0_0/index.md @@ -229,11 +229,20 @@ Migration steps: 3. Configure the theme using the new theming API ```javascript -import { useIxTheme } from '@siemens/ix-aggrid'; +import { getIxTheme } from '@siemens/ix-aggrid'; import { provideGlobalGridOptions } from 'ag-grid-community'; -const ixTheme = await useIxTheme(() => import('ag-grid-community')); +// Get iX theme based on your ag-grid module +const ixTheme = await getIxTheme(() => import('ag-grid-community')); +// Set the theme in your grid options +const gridOptions = { + theme: ixTheme, + // Rest of options +} + +// Or set the theme globally for all grids +// Make sure to do this before initializing any grid provideGlobalGridOptions({ theme: ixTheme, }); From 25abfd71f97f7a9f16c3a94db0c10a162bf199d2 Mon Sep 17 00:00:00 2001 From: Lukas Zeiml Date: Wed, 29 Oct 2025 09:28:54 +0100 Subject: [PATCH 2/2] fix --- docs/components/grid/code.mdx | 2 +- docs/home/migration/4_0_0/index.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/components/grid/code.mdx b/docs/components/grid/code.mdx index 537b7889..a9e6f72f 100644 --- a/docs/components/grid/code.mdx +++ b/docs/components/grid/code.mdx @@ -47,7 +47,7 @@ const ixTheme = await getIxTheme(() => import('ag-grid-community')); const gridOptions = { theme: ixTheme, // Rest of options -} +}; // Or set the theme globally for all grids // Make sure to do this before initializing any grid diff --git a/docs/home/migration/4_0_0/index.md b/docs/home/migration/4_0_0/index.md index 9944f841..e779ef04 100644 --- a/docs/home/migration/4_0_0/index.md +++ b/docs/home/migration/4_0_0/index.md @@ -239,7 +239,7 @@ const ixTheme = await getIxTheme(() => import('ag-grid-community')); const gridOptions = { theme: ixTheme, // Rest of options -} +}; // Or set the theme globally for all grids // Make sure to do this before initializing any grid