mirror of https://github.com/abpframework/abp.git
7 changed files with 35 additions and 20 deletions
@ -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