jspreadsheet / jspreadsheet/ce
Clear multiple cells results in an error
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 7.2k
- Forks
- 890
- PR merge metrics
- No merged PRs in 30d
Description
Trying to clear multiple as mentioned in an issue earlier on
const handleKeydown = (e: KeyboardEvent) => {
if (spreadsheet) {
if (spreadsheet.edition) {
if (e.code === 'Backspace') {
spreadsheet.setValue(spreadsheet.getHighlighted(), '', false);
e.stopPropagation();
}
}
}
}
The delete works fine but onBlur I am getting the error below. I am using a fixed column definition set in options
TypeError: undefined is not an object (evaluating 'cell.children[0].value')
Any insight you can give would be greatly appreciated
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 reproducing the Backspace handler with a fixed column definition and multiple highlighted cells. Trace the onBlur path that reaches the reported cell.children[0].value access; done means clearing multiple cells no longer raises the reported TypeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100