provideSiAgGridConfig Type documentation¶
TypeScript declaration¶
import { provideSiAgGridConfig } from '@siemens/element-ng/ag-grid';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:
// 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
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:
// In app.config.ts
export const appConfig: ApplicationConfig = {
providers: [
provideSiAgGridConfig()
]
};
// With custom options
export const appConfig: ApplicationConfig = {
providers: [
provideSiAgGridConfig('compact', {
rowHeight: 30,
suppressMenuHide: true
})
]
};
-
• 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)
-
• Optional AG Grid options to merge with Element defaults. These options will override Element defaults if specified.
Except where otherwise noted, content on this site is licensed under MIT License.