I have a datagrid with multiple formulas referring multiple cells, I need to generate SQL query for every updated cell, no matter how it’s been updated:
manual input or copy/paste
formulas calculated results
Up until now I tried to use hooks:
afterChange: gives me the cells updated manually
afterFormulasValuesUpdate: gives me all cells on the initial load and the calculated formulas after first init
But I’d like to get all cells update with “afterChange” including formula calculated results
Or maybe from the hotInstance there is a plugin/method to get all updated values??
With cell dependencies based on formulas the afterFormulasValuesUpdate is the right choice (afterChange does not work for formula dependencies). Now, if you wouldn’t want to run it on the initialization you can use the addHook method after initializing the instance, like so
The only exception of keeping the state is when you perform batch operations (ref: docs) - as there you can proceed with many operations one after another and the hooks will get the info after the batch is closed.