ag-Grid行未删除

Gue*_*lla 4 ag-grid angular

我试图像这样从我的ag-Grid删除一行:

let alertRow : RowNode = this.gridApi.getRowNode(rowIndex);
console.log(alertRow);
this.gridApi.updateRowData({remove: [alertRow]});
Run Code Online (Sandbox Code Playgroud)

它给了我这个错误:

ag-Grid:找不到数据项,因为未找到对象

我可以在控制台中看到RowNode正确的节点并存在。我也可以使用updateRowData()添加新行,但尝试删除则会出现此错误。

我在Angular 6组件中使用ag-Grid。

为什么删除不起作用?

un.*_*ike 5

替换updateRowData({remove:[alerRow]})

updateRowData({remove:[alertRow.data]}))

更新的文件

...如果不使用ID,则网格将根据对象引用匹配行。