- I am using tabulator api to display table data.
- I am using "tab" key to navigate on the cells.
- When it is last row and last cell, focus should move to the table footer which is having paging selectable field(attached the screenshot.)
- To know the which is the last row and last cell I am getting selected rowid.
- To know which is the last cell on the last row getting the cell value form cellEdited fucntion.
Code to execute on the tab function:
if(e.keyCode === 9){
console.log("tabbing function called");
var selectedRows = [];
var selectedRowId = 0;
selectedRows = self.get('table').getSelectedRows();
if (selectedRows.length > 0) {
selectedRowId = selectedRows[0]._row.data.id;
}
if (self.get("rowIdMax") === selectedRowId && self.get("activeCell") === self.get('table').getColumns()[3].getField()) {
var pageSizeElement = document.getElementsByClassName("tabulator-page-size")[0];
pageSizeElement.focus();
}
When I click on the tab key from the last and last cell(image : 2222), the cursor should move to the "Page Size" editable field.
Thank you in advance.
Aucun commentaire:
Enregistrer un commentaire