如何在ag-grid中过滤行数据

时间:2018-09-24 10:07:07

标签: javascript angular ag-grid

我想在角度项目中为ag-grid过滤整个行数据。有什么办法吗?

<ag-grid-angular 
  [gridOptions]="iterationGridOptions" 
  columnDefs]="iterationGridDef" 
  [rowData]="gridincidentData" 
  rowHeight="36" 
  [editType]="'fullRow'" 
  [components]="components" 
  singleClickEdit="true" 
  (rowClicked)="onSprintRowClicked($event)" 
  (rowValueChanged)="onSprintRowValueChanged($event)">
</ag-grid-angular>

我想为gridincidentData写一个过滤器。我只需要isEnabled: true个值

这是我的网格事件数据

{
  "_id": ObjectId("5ba8b60a7eae422533eb7e6b"),
  "_class": "com.agile.historicaldata.dao.ASM",
  "id": 65,
  "projectId": 1,
  "incidentData": [{
        "_id": "1",
        "openedBy": "DELA CRUZ, ANNABELLE",
        "isEnabled": false
      },

      {
        "_id": "1",
        "openedBy": "APACIBLE, LORELIE T",
        "isEnabled": true
      },
      {
        "_id": "4",
        "openedBy": "MASACLAO, JOMER R",
        "isEnabled": false
      },
      {
        "_id": "3",
        "openedBy": "MASACLAO, JOMER R",
        "isEnabled": true
      },

1 个答案:

答案 0 :(得分:0)

{
"id": 95,
"seat_name": "gtest",
"seat_url": "http://ooop.com",
"logo_src": null,
"category_id": {},
},