iddan / react-spreadsheet

Simple, customizable yet performant spreadsheet for React
https://iddan.github.io/react-spreadsheet
MIT License
1.34k stars 157 forks source link

I get the error with the code in the document #416

Open Kuroakira opened 3 days ago

Kuroakira commented 3 days ago

I'm new to react-spreadsheet.
To understand the library, I copy the code in the document. When I copy the code of Controlled Section in Usage, I get the following error. image

You should update the document like this.

  const [data, setData] = useState<Matrix<CellBase>>([
    [{ value: "Vanilla" }, { value: "Chocolate" }, { value: "" }],
    [{ value: "Strawberry" }, { value: "Cookies" }, { value: "" }],
  ]);
  return <Spreadsheet data={data} onChange={setData} />;
Kuroakira commented 2 days ago

I created the PR