使用Vue.js的Ag-grid外部过滤器不起作用

时间:2019-06-10 11:03:47

标签: vue.js ag-grid

Ag-grid存在外部过滤器,但不应用外部过滤器。即使externalfilterpresent为true,似乎外部过滤器甚至不使用回调函数。

我不知道这段代码有什么问题。

<ag-grid-vue style="width: 100%; height: 600px;"
                                 class="ag-theme-material"
                                 rowModelType="infinite"
                                 :rowClassRules="rowClassRules"
                                 :rowSelection="rowSelection"
                                 :rowDeselection="true"
                                 :allowContextMenuWithControlKey="true"
                                 :pagination="true"
                                 :cacheOverflowSize="cacheOverflowSize"
                                 :maxConcurrentDatasourceRequests="maxConcurrentDatasourceRequests"
                                 :infiniteInitialRowCount="infiniteInitialRowCount"
                                 :maxBlocksInCache="maxBlocksInCache"
                                 :rowBuffer="rowBuffer"
                                 :getRowNodeId="getRowNodeId"
                                 :gridOptions="gridOptions"
                                 :defaultColDef="defaultColDef"
                                 :paginationAutoPageSize="true"
                                 :paginationPageSize="pagination.PageSize"
                                 @grid-ready="onGridReady"
                                 @first-data-rendered="onFirstDataRendered"
                                 @selection-changed="onSelectionChanged"
                                 id="myGrid"
                                 :floatingFilter="true"
                                 :isExternalFilterPresent="externalFilterPresent"
                                 :doesExternalFilterPass="externalFilterPass"
                    >
  onDateRangeChange(range) {
      this.range=range;
      this.gridApi.onFilterChanged();
  },

    externalFilterPresent() {
      console.log("checking external filter");
        return true;
    },

    externalFilterPass(node) {
      console.log("passing external");
        return node.data.date >= this.range.start;
    },

应该在控制台的每一行显示外部传递,但不显示此输出

0 个答案:

没有答案