I have a question:
I need to color the cells/rows of my table and I am using the context menu example for doing that (https://jsfiddle.net/1nt7t429/), except that I have added multiple cell selection so that the user is able to change the color of multiple selected cells at once.
I also am using the afterChange
hook and inside it I am sending the changes to the server in a saveChanges(payload)
method whose payload looks like this:
const payload = {
index: change[0][0],
property: change[0][1],
oldValue: change[0][2],
newValue: change[0][3],
style:{ //insert style changes here},
}
Now my question: is there any way that I can “catch” the changes made to the style inside the “afterChange”? Is there any example of getting the changes when we are modifying not only the data, but also the css classes? (In the future, besides the color, I also will be adding classes for font changes, like size or weight)
Basically, if someone can alter the jsfiddle example and show me how to get the classes and the changes of the selected cell/row, I would very much appreciate it, I have been stuck on this for 3 days and I am out of ideas.
If not, is there any other(better) way to do what I’m trying to do?