ngx-datatable-wy
    TypeScript icon, indicating that this package has built-in type declarations

    15.2.2 • Public • Published

    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);
    }

    Install

    npm i ngx-datatable-wy

    DownloadsWeekly Downloads

    0

    Version

    15.2.2

    License

    MIT

    Unpacked Size

    5.77 MB

    Total Files

    429

    Last publish

    Collaborators

    • wuyang1023