provideSiAgGridConfig Type documentation¶
TypeScript declaration¶
Provides AG Grid global configuration with Element design system theme. This provider configures AG Grid with the Element theme, custom components, and density-specific styling. Use it in your application providers. Returns: Environment providers for dependency injection Example: Provides AG Grid global configuration with Element design system theme. This provider configures AG Grid with the Element theme, custom components, and density-specific styling. Use it in your application providers. Returns: Environment providers for dependency injection Example: • The density variant to use. Options: • 'compact': Minimal spacing (28px row height, 32px header height, 4px spacing) • 'standard': Default spacing (42px row height, 48px header height, 8px spacing) • 'comfort': Generous spacing (84px row height, 96px header height, 12px spacing) density ? : • Optional AG Grid options to merge with Element defaults. These options will override Element defaults if specified. gridOptions ? : import { provideSiAgGridConfig } from '@siemens/element-ng/ag-grid';// In app.config.ts
export const appConfig: ApplicationConfig = {
providers: [
provideSiAgGridConfig()
]
};
// With custom options
export const appConfig: ApplicationConfig = {
providers: [
provideSiAgGridConfig('compact', {
rowHeight: 30,
suppressMenuHide: true
})
]
};
provideSiAgGridConfig(density?: "compact" | "comfort" | "standard" = 'standard', gridOptions?: GridOptions<any>): EnvironmentProviders // In app.config.ts
export const appConfig: ApplicationConfig = {
providers: [
provideSiAgGridConfig()
]
};
// With custom options
export const appConfig: ApplicationConfig = {
providers: [
provideSiAgGridConfig('compact', {
rowHeight: 30,
suppressMenuHide: true
})
]
};
"compact" | "comfort" | "standard" = 'standard' ¶ GridOptions<any> ¶
Except where otherwise noted, content on this site is licensed under MIT License.