-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
To reproduce, start typing into a cell on one device. Then type into another cell from another device.
On the first device, the whole state is refreshed and whatever was typed is lost.
It happens when the whole model is recreated here:
Lines 97 to 98 in afe3213
| const newModel = Model.from_bytes(model.toBytes()); | |
| setModel(newModel); |
If I comment out these lines then the changes are not lost, but the state is also not refreshed until I move focus somewhere else.
Original application does not recreate the model, but redraws the whole component using setRedrawId hack:
https://github.com/ironcalc/IronCalc/blob/b9b3cb1628616a746fe7c06d41162df739eb79c0/webapp/IronCalc/src/components/Workbook/Workbook.tsx#L40-L42
If I add this setRedrawId to function App() and call it from setUpdateListener instead of recreating the model, there is the same problem, so it is likely a problem in the original app as well.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels