jspreadsheet / pro

Jspreadsheet Pro | The javascript spreadsheet
https://jspreadsheet.com/
15 stars 1 forks source link

Cut and paste breaks formula #294

Open shm0x opened 1 year ago

shm0x commented 1 year ago

When we cut (Ctrl + X) and paste (Ctrl + V) some cell or range, it breaks all formulas using the cell/range reference.

Is there any solutions for that ?

Thanks.

shm0x commented 1 year ago

Reproduction :

now B1 should display value of A1

A1 is now empty C1 now contains previous A1 value, B1 still contains =A1 and thus display nothing

B1 formula should be updated to be =C1 Is this normal behavior ? I think the reference should be updated when cut/pasting so formulas never breaks when moving cells like it does when moving row or column.

hodeware commented 1 year ago

Copy and paste does not update references on Jspreadsheet although I believe that should be a feature request.

shm0x commented 1 year ago

For copy and paste, this is normal as we duplicate data, so references shouldn't change. I was talking about cut and paste, as cells move, then all references to thoses cells should be updated to avoid breaking formulas somewhere else.

hodeware commented 1 year ago

This behavior will be part in the next release. Thanks for the suggestion