我正在尝试使用'setQuickFilter()'
仅过滤错误单元格行。
我尝试了以下示例错误单元格[ 'N/A', 'E45' ]
,但没有好运。任何专家的解决方案。
HTML
<a (click)="onQuickFilterChanged()">
<span class="error"></span>
<span>Error</span>
</a>
<ag-grid-angular *ngIf="!cLoader" #agGrid id="cisGrid" class="ag-theme-balham cis-grid excelsheet"
[defaultColDef]="defaultColDef" [frameworkComponents]="frameworkComponents" [columnDefs]="columnDefs"
[columnTypes]="columnTypes" [rowData]="rowData" [gridOptions]="gridOptions" [context]="context"
[stopEditingWhenGridLosesFocus]="false" (cellValueChanged)="onCellValueChanged($event)"
suppressHorizontalScroll="false" (gridReady)="onGridReady($event)">
</ag-grid-angular>
TS
onQuickFilterChanged() {
this.gridOptions.api.setQuickFilter(this.fil());
this.gridOptions.api.onFilterChanged();
}
fil() {
return [
'N/A', 'E45'
];
}
过滤结果之前
点击错误文本链接后的预期过滤结果。