We are setting background color on our table dynamically based on a few information: if the cells is editable and if it has been edited on a previous session by the user.
The issue is that when we send the information to the function that returns the background color we need to get this information from the column, and since our table has more than 200 columns, it would be better to do this in a dynamic way (for maintanence purposes also).
The callback for the function is {{ coloringFn("columnId", "rowId", "currentValue", "previousValue") }} . We are unable to get the columnId dynamically.
Hi @fmaltafleury-techinsights , have you tried using item? You could do something like {{ coloringFn(item, "rowId", "currentValue") }}. I'm not sure what you want to do with row ID and currentValue but item should return the column ID for each row!
Yeah, my mistake again. You can reference item for the value in that column, i for the row number, and self for the whole table, but there is no built-in reference to the specific column you're on.
Unfortunately you'll either have to hardcode it or transform your data to have key-value pairs, in which you could access the column name through the item keyword.