【问题标题】:using infinite scrolling neither onRowDataChanged or onRowDataUpdated get called使用无限滚动既不会调用 onRowDataChanged 也不会调用 onRowDataUpdated
【发布时间】:2020-07-23 21:42:40
【问题描述】:

在 agGrid 上使用无限滚动时,这两个事件都不会被调用。有没有办法捕获数据已更新?

这是我的网格配置

    <ag-grid-angular
  #agGrid
  style="width: 100%; height: 100%;"
  id="ri-search"
  class="ag-theme-balham"
  [columnDefs]="columnDefs"
  [defaultColDef]="defaultColDef"
  [components]="components"
  [rowSelection]="'multiple'"
  [rowDeselection]="true"
  [rowModelType]="'infinite'"
  [paginationPageSize]="10"
  [cacheBlockSize]="100"
  [cacheOverflowSize]="2"
  [maxConcurrentDatasourceRequests]="2"
  [infiniteInitialRowCount]="1"
  [maxBlocksInCache]="2"
  [pagination]="true"
  [paginationAutoPageSize]="true"
  [getRowNodeId]="getRowNodeId"
  (gridReady)="onGridReady($event)"
  (onRowDataUpdated)="onGotData1($event)"
></ag-grid-angular>

这里是事件处理程序

  onGotData1(params){
    console.info('hi');
  }

on got data 永远不会被调用。

【问题讨论】:

    标签: ag-grid


    【解决方案1】:

    您需要处理(rowDataUpdated)="onGotData1($event)"。你期待错误的事件。

    参考:Grid Events

    同样,rowDataChanged 是您正在寻找的另一个事件。

    【讨论】:

    • 仍然没有触发。实际上都不火
    • 它应该可以工作。您能否签入参考链接中提供的其中一项?此外,如果您可以创建一个复制您的问题的 plunk,那么您将更容易解决您面临的挑战。
    猜你喜欢
    • 1970-01-01
    • 2019-06-24
    • 1970-01-01
    • 2021-04-02
    • 2018-06-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多