Reproducer:
yarn create vite spreadsheet-repro --template react-ts
yarn add scheduler react-spreadsheet
yarn
yarn dev
Then replace the code in App.tsx with the following:
const [data, setData] = useState([
[{ value: "Vanilla" }, { value: "Chocolate" }, { value: "" }],
[{ value: "Strawberry" }, { value: "Cookies" }, { value: "" }],
]);
const setDataWrapper = (data) => {
console.log("setting data")
setData(data)
}
return (
<Spreadsheet data={data} onChange={setDataWrapper} />
)
Start editing cells and the console will be spammed with hundreds of rapid setting data lines. (It might take two or three edits, but it always happens consistently in both Firefox and Chrome.
Using react-spreadsheet 0.9.5 but have tried multiple versions ranging back to 0.7.0.
Reproducer:
Then replace the code in
App.tsxwith the following:Start editing cells and the console will be spammed with hundreds of rapid
setting datalines. (It might take two or three edits, but it always happens consistently in both Firefox and Chrome.Using react-spreadsheet 0.9.5 but have tried multiple versions ranging back to 0.7.0.