Don't show hyperformular when user clicks in cell

Tags: #<Tag:0x00007efc8391d468> #<Tag:0x00007efc83927a30>

Hi there,
I have a cell which is calculated according to the two previous cells.
e.g. ‘=A1+B1’.
The user should be able to overwrite the value with their own desired value (should they wish), but when the user clicks in the cell to edit it, they see the hyperformular in string format ‘=A1+B1’.
Q: is there a hook that helps with this? i.e. when the user clicks in the cell, the value simply changes to it’s calculated value or 0 so that they don’t see the hyperformular?

Hi @dan.h.adams

Thank you for contacting us. There isn’t an easy way to do this, and additionally, the solutions that might be used will definitely erase the initial formula on opening the editor.

If that’s ok for you, then you would need to create a custom editor, that will replace the initial formula with calculated value. We don’t have any examples of such implementation, but here’s our guide on how to build your own custom editor: https://handsontable.com/docs/javascript-data-grid/cell-editor/

hi @adrian.szymanski, thank you for this link.
I don’t mind erasing the initial formula, as I can always reset it in state (react).
I will take a look at the documentation and see what works.
thx again

Hi @dan.h.adams

Ok, let me know if you would have any questions during the implementation.