-
-
Notifications
You must be signed in to change notification settings - Fork 230
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Sheet not found when using API #490
Comments
did you solve the problem? I got a similar issue.
|
I must have missed this issue since it's quite old, I will have a look this week |
For my case, I solved the problem in the following way. My development enviromentNext.js App router 13.5.4 code explanation
<div css={workBook}>
<Workbook data={ref.current?.getSheet() ? [ref.current.getSheet()] : [{ name: "Sheet1" }]} ref={ref}/>
</div>
import { useRouter } from "next/navigation";
const router = useRouter();
...
<FileButton text="수정하기" onClick={() => router.push("/Dashboard/edit")} />
...
const handleSave = () => {
if (ref.current) {
const celldataArray = ref.current.getSheet() as any;
postSchedule(
{ constrId, formData: celldataArray },
{
onSuccess: () => router.push("/Dashboard"),
},
);
}
}; The error occur when I click the save button and router.push("/Dashboard") is called. how I fixed itI changed "router.push" to window.location.href. <FileButton text="수정하기" onClick={() => (window.location.href = "/Dashboard/edit")} />
...
onSuccess: () => (window.location.href = "/Dashboard"), I don't know why this works. If someone knows the reason, please comment. |
I think the hard reload is getting rid of any indeterminate states which might be causing this issue. Need to have a deeper look. |
Describe the bug
I am trying to recreate a sheet by removing current sheets, adding new sheets, and populating the cells. So far so good, the sheet remove and recreate works, value set works, but when I try to set cell formats it presents the error below.
To Reproduce
Steps to reproduce the behavior:
Sheet reloading process, this is the failing process.
Cell format function
Not relevant, but it is here, the saving process for local storage
The workbook itself:
The error happens when
getAllSheets()
process runs andcellFormat()
is called. If I takecellFormat()
out ofgetAllSheets()
and use separate buttons, both works.Expected behavior
I expect to be able to format the sheet in the same process I am creating the sheets.
Additional context
I tried to use CommonOptions to determine the sheet I am referring to, but I am probably doing it wrong. Try to find an example in the documentation or in here with no luck. It would be nice if you can provide me an example.
The text was updated successfully, but these errors were encountered: