handsontable / handsontable/hyperformula
`#SPILL` error should recalculate on changes to result area (before: "Setting a null value in the ARRAYFORMULA expansion area does not update the NoSpaceForArrayResult error[Bug]")
Open
Nobody has claimed this yet.
Bug
Impact: Medium
- Dominant language
- TypeScript
- Stars
- 2.8k
- Forks
- 171
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 7
Description
Description
The following code does not run as expected
const hf = HyperFormula.buildEmpty({
licenseKey: "gpl-v3"
});
// Add a new sheet and get its id.
const table1 = hf.addSheet("table1");
hf.setCellContents(
{
row: 0,
col: 0,
sheet: hf.getSheetId(table1)
},
[[1,2],['=ARRAYFORMULA(A1:B1 > 1)', 1]]
);
// When set null at B2 does not recompute formula cell
hf.setCellContents(
{
row: 1,
col: 1,
sheet: hf.getSheetId(table1)
},
[[null]]
);
Expected behavior is that A2 recaculate when set null at B2
Video or screenshots
No response
Demo
https://codesandbox.io/s/nostalgic-wozniak-imse6d?file=/src/index.js
HyperFormula version
2.4.0
Your framework
No response
Your environment
chrome 113
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the provided HyperFormula.buildEmpty and setCellContents reproduction in the linked CodeSandbox. Trace how ARRAYFORMULA dependencies are updated when B2 is set to null, and verify that A2 recalculates and clears the #SPILL error. Done means the demonstrated change produces the expected result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- data
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100