react-spreadsheet icon indicating copy to clipboard operation
react-spreadsheet copied to clipboard

Not rerendering on data change

Open dandanthedev opened this issue 7 months ago • 1 comments

Hi! I'm working on a live collab app using react-spreadsheet ,but i'm running into this issue:

https://github.com/user-attachments/assets/0f2a323b-63fb-454f-bf7d-44f0130c4b92

You can see the data updating at the bottom (i'm just stringifying the data var there). That's the same data that i'm passing into react-spreadsheet. But it only seems to reflect in the UI after interacting with something related to it (the row, the col or the cell itself).

I'm running the spreadsheet like

const [data, updateData] = useState(sheetData?.sheetData);
<Spreadsheet
          data={data as Matrix<CellBase>}
/>

Any ideas why this could be happening?

dandanthedev avatar Jul 19 '25 14:07 dandanthedev