Browse Source

refactor: remove Host decorator from datatable helper directives

pull/4216/head
Arman Ozak 6 years ago
parent
commit
ccec52c008
  1. 4
      npm/ng-packs/packages/theme-shared/src/lib/directives/ngx-datatable-default.directive.ts
  2. 3
      npm/ng-packs/packages/theme-shared/src/lib/directives/ngx-datatable-list.directive.ts

4
npm/ng-packs/packages/theme-shared/src/lib/directives/ngx-datatable-default.directive.ts

@ -1,4 +1,4 @@
import { Directive, Host, HostBinding, Input } from '@angular/core';
import { Directive, HostBinding, Input } from '@angular/core';
import { ColumnMode, DatatableComponent } from '@swimlane/ngx-datatable';
@Directive({
@ -14,7 +14,7 @@ export class NgxDatatableDefaultDirective {
return `ngx-datatable ${this.class}`;
}
constructor(@Host() private table: DatatableComponent) {
constructor(private table: DatatableComponent) {
this.table.columnMode = ColumnMode.force;
this.table.footerHeight = 50;
this.table.headerHeight = 50;

3
npm/ng-packs/packages/theme-shared/src/lib/directives/ngx-datatable-list.directive.ts

@ -2,7 +2,6 @@ import { ListService } from '@abp/ng.core';
import {
ChangeDetectorRef,
Directive,
Host,
Input,
OnChanges,
OnDestroy,
@ -22,7 +21,7 @@ export class NgxDatatableListDirective implements OnChanges, OnDestroy, OnInit {
@Input() list: ListService;
constructor(@Host() private cdRef: ChangeDetectorRef, @Host() private table: DatatableComponent) {
constructor(private table: DatatableComponent, private cdRef: ChangeDetectorRef) {
this.table.externalPaging = true;
this.table.externalSorting = true;
}

Loading…
Cancel
Save