mirror of https://github.com/abpframework/abp
parent
dc59842515
commit
cd34500aa5
@ -1,3 +1,4 @@
|
||||
export * from './loading.directive';
|
||||
export * from './ngx-datatable-default.directive';
|
||||
export * from './ngx-datatable-list.directive';
|
||||
export * from './table-sort.directive';
|
||||
|
@ -0,0 +1,23 @@
|
||||
import { Directive, Host, HostBinding, Input } from '@angular/core';
|
||||
import { ColumnMode, DatatableComponent } from '@swimlane/ngx-datatable';
|
||||
|
||||
@Directive({
|
||||
// tslint:disable-next-line
|
||||
selector: 'ngx-datatable[default]',
|
||||
exportAs: 'ngxDatatableDefault',
|
||||
})
|
||||
export class NgxDatatableDefaultDirective {
|
||||
@Input() class = 'material bordered';
|
||||
|
||||
@HostBinding('class')
|
||||
get classes(): string {
|
||||
return `ngx-datatable ${this.class}`;
|
||||
}
|
||||
|
||||
constructor(@Host() private table: DatatableComponent) {
|
||||
this.table.columnMode = ColumnMode.force;
|
||||
this.table.footerHeight = 50;
|
||||
this.table.headerHeight = 50;
|
||||
this.table.rowHeight = 'auto';
|
||||
}
|
||||
}
|
Loading…
Reference in new issue