afterChange arguments

Tags: #<Tag:0x00007efc6bbfd498>

Hello,

I need clarification on arguments of afterChange callback.
1st argument is array of tuples: [number, string | number, CellValue, CellValue]
where 2nd item of a tuple is string or number.
I reckon when it is a number – then it is the column index.

Q: What is is when 2nd item is a string?
Q: How do I control what is returned in 2nd argument?

Thank you,
Igor.

1 Like

Hi @igort

the 2nd parameter is always a string. Here’s a list of predefined values that can become 2nd parameter https://handsontable.com/docs/7.2.2/tutorial-using-callbacks.html Each of the string represents different type of change.

You can also create a custom value and get it as the 2nd parameter of the afterChange hook. It happens if you define all parameters of the setDataAtCell function, example https://jsfiddle.net/7x0ga94e/

The questions not about 2nd argument of afterChange. Rather, it is about 2nd item in the tuple (the column):

[number, string | number, CellValue, CellValue]

Thanks,
Igor.

Yes, right!

The prop (2nd value of the changes) is