'Is there any way to delay rendering row in a grid in React?
I'd like to ask that if there any way could delay rendering and displaying rows, meanwhile showing a loading overlay. I'm using react and ag-grid. render Code is like below
onGridReady(params) {
this.gridApi = params.api;
this.gridColumnApi= params.columnApi
this.datasource={
getRows:this.getDatasetRows.bind()this
params.api.setDatasource(this.dataSource)}
}
Solution 1:[1]
Maybe you can update the rowdata after render instead of delay rendering.
Update Row Data
api.setRowData(newData)
Update Single Row / Cell
rowNode.setData(data)
rowNode.setDataValue(col,value)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | cc7 |