diff --git a/projects/ngx-datatable/src/lib/components/datatable.component.ts b/projects/ngx-datatable/src/lib/components/datatable.component.ts index 2e6a68537..c6b71077b 100644 --- a/projects/ngx-datatable/src/lib/components/datatable.component.ts +++ b/projects/ngx-datatable/src/lib/components/datatable.component.ts @@ -701,8 +701,16 @@ export class DatatableComponent implements OnInit, DoCheck, AfterViewInit, After this.rowDiffer = differs.find({}).create(); // apply global settings from Module.forRoot - if (this.configuration && this.configuration.messages) { - this.messages = { ...this.configuration.messages }; + if (this.configuration) { + if (this.configuration.messages) { + this.messages = { ...this.configuration.messages }; + } + if (this.configuration.cssClasses) { + this.cssClasses = { ...this.configuration.cssClasses }; + } + this.headerHeight = this.configuration.headerHeight ?? this.headerHeight; + this.footerHeight = this.configuration.footerHeight ?? this.footerHeight; + this.rowHeight = this.configuration.rowHeight ?? this.rowHeight; } } diff --git a/projects/ngx-datatable/src/lib/ngx-datatable.module.ts b/projects/ngx-datatable/src/lib/ngx-datatable.module.ts index f3b351d8f..720ce8375 100644 --- a/projects/ngx-datatable/src/lib/ngx-datatable.module.ts +++ b/projects/ngx-datatable/src/lib/ngx-datatable.module.ts @@ -105,9 +105,21 @@ export class NgxDatatableModule { * Interface definition for INgxDatatableConfig global configuration */ export interface INgxDatatableConfig { - messages: { + messages?: { emptyMessage: string; // Message to show when array is presented, but contains no values totalMessage: string; // Footer total message selectedMessage: string; // Footer selected message }; + cssClasses?: { + sortAscending: string; + sortDescending: string; + sortUnset: string; + pagerLeftArrow: string; + pagerRightArrow: string; + pagerPrevious: string; + pagerNext: string; + }; + headerHeight?: number; + footerHeight?: number; + rowHeight?: number; }