Following is the code to display data in ag-grid when page loads.
components: {
loadingCellRenderer: function (params) {
if (params.node.id !== undefined ) {
return params.value;
} else {
return `<img src=${loading}>`;
}
}
}
When no rows fetched from backend then overlayNoRowsTemplate gets displayed.
fetchCall.fetchResponse().then(async response => {
let endRow = -1;
if (response.length) {
if (response.length < pagination.pageSize) {
endRow = params.startRow + response.length;
}
params.successCallback(response, endRow);
this.gridApiVal.hideOverlay();
} else {
this.gridApiVal.showNoRowsOverlay();
}
});
}
overlayNoRowsTemplate:
‘No Rows in search result’,
Issue in addition to overlayNoRowsTemplate ,loading icon is displayed in the cell.
Requirement : loading icon not to be shown after overlayNoRowsTemplate is displayed