I’m trying to set afterChange dynamically upon change of some variable.
However, it seems to get updated for the first time but not afterward.
Is there any preferred way to update afterChange dynamically?
How to reproduce:
-
without changing text, change cell values
-> prints “afterChange: text is 2 2”
-
change text to “3”
-> prints “afterChange: text is not 2 3”
-
change text back to “2”
-> still prints “afterChange: text is not 2 2”
when the expected output should be “afterChange: text is 2 2”
Please refer to samples I tried: