-
Notifications
You must be signed in to change notification settings - Fork 298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Grid should accept async renderCell functions #139
Comments
Same for Editor.js. This would allow things such as IoC instanciation of controls with dependency injection. //J |
In my application, a very small percentage of cells are very expensive to compute, rendering them asynchronously will significantly decrease the load time of the rest of the grid. However, I am not convinced that this needs to be built in to the dgrid. My original plan was to have renderCell insert a loading indicator and generate a closure that will be used to asynchronously update the cell. |
👍 Any news on this? It'd be great to be able to use deferred objects in formatter or renderCell |
Yeah that would be great. |
It would help immensely if the grid would accept renderCell functions that return deferreds. Then we could maybe have async rendering of components in the grid.
this code in Grid.js
}else if(column.renderCell){
// A column can provide a renderCell method to do its own DOM manipulation,
// event handling, etc.
appendIfNode(td, column.renderCell(object, data, td, options));
could maybe be something like:
}else if(column.renderCell){
cell = column.renderCell(object, data, td, options);
if(cell.then)
cell.then(function(node) { appendIfNode(td, node); });
else
// A column can provide a renderCell method to do its own DOM manipulation,
// event handling, etc.
appendIfNode(td, cell);
And of course the same in the other places where renderCell or renderHeadercell is used.
//J
The text was updated successfully, but these errors were encountered: