Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Kuroakira opened this issue Nov 23, 2024 · 1 comment
Open

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

Kuroakira opened this issue Nov 23, 2024 · 1 comment

Comments

@Kuroakira
Copy link
Contributor

Kuroakira commented Nov 23, 2024

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
Copy link
Contributor Author

I created the PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant