formulasUpdated listener #1155
BrianHung
started this conversation in
Feature requests
Replies: 1 comment 2 replies
-
@BrianHung Can I ask you to share the feedback at #1156? I wouldn't want to loose as it is harder to track updates to GitHub Discussions. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
#845 #135 handsontable/handsontable#8114
It would be useful to have a
formulasUpdated
listener, as mentioned in #135.I've been trying to integrate hyperformula with an external data source (to work with React etc), and have noticed that some methods like
addRow
andmoveRows
modify internal formula representations.Essentially the same problem that handsontable faces in handsontable/handsontable#8114, where you can move rows and columns but formulas referencing values in those moved rows or columns are now out of date.
For example if we had a
=SUM(A1:B3)
and the third row was deleted, the formula would be changed to=SUM(A1:B2)
.Right now the only way to correctly react to changes in formulas is to use
getAllSheetsSerialized
.However, this isn't as efficient as
valuesUpdated
is for listening to changes in values, since there can be a lot of sheets and would cause excessive re-rendering without manual diffs (which is also expensive).For fun, you can try applying https://features.jsomers.net/how-i-reverse-engineered-google-docs/ to google sheets, and can see that they update formulas on things like moveRow too!
Beta Was this translation helpful? Give feedback.
All reactions