15.2.2 • Published 5 years ago

ngx-datatable-wy v15.2.2

Weekly downloads
4
License
MIT
Repository
github
Last release
5 years ago

ngx-datatable-wy

fork from @swimlane/ngx-datatable

support Angular7.0, wyy branch for publish.

 # package

 npm run package

 # postversion
 npm run postversion --[tag]

Feature

  onBodyScroll() {
    // ...
    // this.updateRows(); // source code
    if(event.direction) { // Vertical scroll
      this.updateRows();
    }
  }
  recalculate(): void {
    this.recalculateDims();
    this.recalculateColumns();
    this.cd.markForCheck(); // +++
  }
  selectRow(event: KeyboardEvent | MouseEvent, index: number, row: any): void {
    //...
    this.select.emit({
      selected,
      row // +++ 选中行返回当前行数据
    });
  }

Bugfix

constructor(private cd: ChangeDetectorRef) {
  // declare fn here so we can get access to the `this` property
  this.rowTrackingFn = function(this: any, index: number, row: any): any {
    const idx = this.getRowIndex(row);
    if (this.trackByProp) {
      return row[this.trackByProp]; // to fix
      // return `${idx}-${this.trackByProp}`; // source code
    } else {
      return idx;
    }
  }.bind(this);
}
15.2.2

5 years ago

15.1.1

5 years ago

15.0.1

5 years ago

15.0.0

5 years ago

14.0.4

5 years ago

14.0.3

5 years ago

14.0.2

5 years ago

14.0.1

5 years ago

14.0.0

5 years ago