lundi 5 août 2019

From the Tabulator focus is not moving to the table footer editable fields

  1. I am using tabulator api to display table data.
  2. I am using "tab" key to navigate on the cells.
  3. When it is last row and last cell, focus should move to the table footer which is having paging selectable field(attached the screenshot.)

enter image description here

  1. To know the which is the last row and last cell I am getting selected rowid.
  2. 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