`getRowStyle` does not update the style in a callback
AnnMarieW opened this issue · 4 comments
When you update the getRowStyle
prop in a callback, the style is not applied unless the grid or the page is refreshed.
The issue and the workaround is posted here on the forum
I'm not sure if there is a way to allow for this, as this most likely pertains to the underlying grid and how it functions.
Could we add the redrawRows()
method like in the clientside callback in the workaround example on the forum as posted above? That would make it unnecessary for everyone to add that callback to their apps.
Revisiting this, I've used the redrawRows()
a couple of times, this use-case makes more sense then some of the others I've used it for to automatically have the grid perform this.. My only concern is with things like infinite scroll or massive grid's that could cause issues.
For example, think of something like adjusting conditional formatting:
User makes changes to conditions <200 rows, dev opts to render the changes immediately, >=200 rows, dev allows user to opt to make these changes right now, or the next time they render the grid. Which at any point they have the ability to use a render button on the page that reloads the data from the server or uses the redraw method.
I dont think we should say that it happens this way immediately for the result of some unexpected behaviour.
We could potentially have something in there where we give the option for the dev to say have upon these events, redraw the rows, that way the dev has more control over unexpected side effects.
Good points. The clientside callback for redrawRows
is pretty simple. Maybe adding some use cases and examples to the docs is all that's needed.