Jspreadsheet is a lightweight vanilla javascript plugin to create amazing web-based interactive tables and spreadsheets compatible with other spreadsheet software.
First, thanks for developing and maintaining jspreadsheet, it is very awesome and extremely useful.
I'm working on integrating jspreadsheet with select2 as a custom-editor (will publish working code soon).
I'd like to suggest/request a minor improvement regarding custom-editors: the ability to pass the DOM/JS event that triggered the custom-editor's openEditor function. This will enable making the user-experience much smoother. For example, if a user pressed "BACKSPACE", I can delete the cell's content instead of opening the custom-editor UI.
I have only limited understanding of jspreadsheet internals, but code changes seem minimal and not disruptive. I attach them here as a diff to index.js, but I understand that it could require changing other files.
With these changes, the custom-editor function becomes:
openEditor : function(cell, el, empty, event) {
...
}
And then the event parameter can indicate why triggered opening the custom-editor.
There's an old closed issue (#990 ) that relates to custom-editors, and I think I encountered the same issue: getValue and setValue are never called, even in the latest git version. A different function updateCell does get called, but it is undocumented.
Hello,
First, thanks for developing and maintaining
jspreadsheet
, it is very awesome and extremely useful.I'm working on integrating
jspreadsheet
withselect2
as a custom-editor (will publish working code soon).openEditor
function. This will enable making the user-experience much smoother. For example, if a user pressed "BACKSPACE", I can delete the cell's content instead of opening the custom-editor UI.I have only limited understanding of
jspreadsheet
internals, but code changes seem minimal and not disruptive. I attach them here as a diff toindex.js
, but I understand that it could require changing other files.With these changes, the custom-editor function becomes:
And then the
event
parameter can indicate why triggered opening the custom-editor.getValue
andsetValue
are never called, even in the latest git version. A different functionupdateCell
does get called, but it is undocumented.An example of both of these issues is here: https://jsfiddle.net/1egbq690/2/
I'm happy to provide further details if needed.
Thanks! gordon