如何将checkbox值绑定到event.and如何访问相应的数据?
home.ts
columns = [
{
field: 'reportingLocation',
headerName: 'Reporting Location '
},
{
field: 'country',
headerName: 'Country Name'
},
{
field: 'DEL',
headerName: 'DEL',
editable:true,
headerCheckboxSelection: true,
headerCheckboxSelectionFilteredOnly: true,
checkboxSelection: true
} ];
我有一个函数来获取DEL=TRUE
的行
deleteLocations(e) {
console.log(this.list);
e.preventDefault();
this.list
.filter((item: any) => {
return !!item.DEL;
})
.map(item => {
this.store.dispatch(new
LocationAndResponsibilityActions.OnLocationDelete(item.location_Id));
}); }
我无法访问DEL
值,使用aggrid复选框选择的正确方法是什么?
ag-grid有一些selection events,但听起来像(rowSelected)
可能是你正在寻找的。它将对象作为param传递回来,该param包含行数据以及一些其他有用的属性。