jspreadsheet / jspreadsheet/ce
Remove forced console.logs when returning false when inserting/deleting a row
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 7.2k
- Forks
- 890
- PR merge metrics
- No merged PRs in 30d
Description
I want to use the default contextMenu that is provided by this library, but I want to handle the events in a custom manner. Therefore I return false in my onbeforeinsertrow and onbeforedeleterow functions. However, returning false here always results in an unnecessary console log by the library:
// Onbeforeinsertrow
if (obj.dispatch('onbeforeinsertrow', el, rowNumber, numOfRows, insertBefore) === false) {
console.log('onbeforeinsertrow returned false');
return false;
}
and
// Onbeforedeleterow
if (obj.dispatch('onbeforedeleterow', el, rowNumber, numOfRows) === false) {
console.log('onbeforedeleterow returned false');
return false;
}
Can these be made optional/removed?
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
Search the JavaScript source for the onbeforeinsertrow and onbeforedeleterow dispatch blocks shown in the issue. Check the surrounding event-handling behavior and verify that returning false still prevents the row operation without producing the unwanted console output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100