[Data Grid Web] Save View saves cellRenderer function which causes rendering issues
Forge component by OutSystems R&D
Published on 14 Dec 2020
Application Type
Traditional Web


I have a grid with columns that make use of the OSCellRenderer property to format the values and uses the ConfigurationSaveButton to store the current layout of the grid.

I'll explain my issue with an example:

Let's imagine a user stores the current layout of a grid and, afterwards, the developer adds a new function to the OSCellRenderer property of a column.

Given that the OSCellRenderer property is loaded from the configurations the user stored prior to that change, the new function will not be applied to the grid until the user clicks the ConfigurationResetButton, which they won't know to click to see the changes applied.

Furthermore, let's imagine that the change is to remove a function from that OSCellRenderer property and the developer ultimately removes the JS function altogether from the page, since it's unnecessary. When the user opens the page, the grid will still try to call the function the developer removed and the grid will break, stopping at the loading stage as you can see below (the "TableFunctions.calculatedDifferenceColors" function is no longer referenced in ServiceStudio and the JS was deleted). An end-user won't understand what's happening and further refreshes to the page won't fix the issue. Only when clicking the Reset button will the issue be fixed.

What is the best course of action regarding this?

I've thought of calling a timer that would clear the GridConfigurations entity where the eSpaceId matches the one where the grid is stored, however this would delete other configurations that the user stored, providing a bad UX, because suddenly the user would lose the saved layouts they had, because of a single cellRenderer function.

And even then, either the timer would be called automatically when the module is published, which would clear everything even if not needed, or it would have to be called manually by the developers, which would be an easy thing to forget when dealing with deploys to other environments.

Best regards,

Ivo Frazão Costeira

Hello Ivo Frazão Costeira!

Thanks for bringing this interesting use case. We are going to try to replicate it, discuss it internally and try to figure out the best way to handle it.

Best regards,

Gabriel Lundgren