【发布时间】:2019-04-20 21:26:08
【问题描述】:
我的 html 文件中有这段代码:
<ag-grid-angular #agGrid
style="height: 300px"
[rowData]="rowData"
[columnDefs]="columnDefs"
[gridOptions]="gridOptions"
[enableFilter]="true"
(rowSelected)="getSelectedRows($event)">
</ag-grid-angular>
并且过滤器图标是可见的,但是当单击该图标时没有任何反应,并且未显示 ag-grid 过滤器。 出了什么问题?
component.ts:
import { AgGridNg2 } from 'ag-grid-angular';
@ViewChild('agGrid') agGrid: AgGridNg2
columnDefs = [
{
headerName: 'row',
headerCheckboxSelection: true,
checkboxSelection: true,
pinned: "right",
width: 150
},
{ headerName: 'code', field: 'Code'},
{ headerName: 'name', field: 'Name' },
];
gridOptions = {
rowSelection: 'multiple',
enableSorting: 'true',
enableColResize: 'true',
enableRtl: 'true',
pagination: 'true',
paginationAutoPageSize: 'true',
animateRows: 'true'
}
【问题讨论】:
-
请发布您的 ts 代码。