我一直在尝试使用自定义过滤器来过滤数据网格内部的枚举,以用于透明度设计系统数据网格。您是否碰巧有任何示例说明如何获取选择列表以正确渲染和过滤网格列。列中选择列表的样式似乎也有问题。任何帮助将不胜感激。
<clr-dg-filter [clrDgFilter]="myFilter">
<select clrSelect (click)="toggleInspection(InspectionStatus)" >
<option value="">Choose</option>
<option value="0">In Progress</option>
<option value="1">Awaiting Approval</option>
<option value="2">In Review</option>
<option value="3">Approved - (Needs Office Approval)</option>
<option value="7">Finalized & Completed</option>
</select>
</clr-dg-filter>
class MyFilter implements ClrDatagridFilterInterface<any> {
changes = new Subject<any>();
isActive(): boolean {
return true;
}
accepts(inspection: any) {
console.log('test');
console.log(inspection);
return true;
}
toggleInspection(status: any){
console.log(status);
}
}