Commit 39731dbb by Billy Larru

agregar evento tabindex al handsontable

parent a95cece8
......@@ -102,8 +102,42 @@ 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();
......
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