我试图像这样从我的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。
为什么删除不起作用?