Commit 39731dbb by Billy Larru

agregar evento tabindex al handsontable

parent a95cece8
......@@ -102,15 +102,49 @@ function mostrarVistaPrevia() {
}
]
});
registrarEventoTab();
}
function registrarEventoTab() {
Handsontable.Dom.addEvent(document.body, 'keydown', function (e) {
if (e.keyCode === 9 && handsonTable) {
e.stopPropagation();
var selection = handsonTable.getSelected();
var rowIndex = selection[0];
var colIndex = selection[1];
console.log(`row=${rowIndex}, col=${colIndex}`)
//rowIndex++;
colIndex++;
if (colIndex > 7) {
rowIndex++;
colIndex = 6;
} else if (colIndex < 6) {
colIndex = 6;
}
handsonTable.selectCell(rowIndex, colIndex);
}
});
}
// This example creates a date editor that will show MM/YYYY
const TA_EDITOR_HORA = Handsontable.editors.TextEditor.prototype.extend();
TA_EDITOR_HORA.prototype.createElements = function () {
Handsontable.editors.TextEditor.prototype.createElements.apply(this, arguments);
// You need to require/import the "inputmask" library
// You need to require/import the "inputmask" library
var im = new Inputmask('99:99');
// Create password input and update relevant properties
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment