Reputation: 5329
I have a peculiar problem to address. I am using ag-grid enterprise version and the data is loaded in the grid using Angular/NgRx with SpringBoot in the backend. There are 10 columns in the grid and 9 of them are pretty easy to load from the database. The remaining column is a bit complex to process on backend and it hampers the overall grid load time.
Here's what I am looking for:
Upvotes: 0
Views: 1734
Reputation: 1113
Split your query in two:
const withCol10 = [
{
id: 1,
col10: 42
}
// ...
];
this.gridApi.forEachNode(rowNode => {
const original = rowNode.data;
const updated = withCol10.find(i => i.id === original.id);
if (!updated) {
rowNode.setData({
...original,
...updated
});
}
});
See docs for more details.
Upvotes: 1