Strange data sorting and DataTable data entry
I recently added a KeyTable extension for datatable to navigate my table with arrows.
First, I added the following code to select the first record of my table:
gruposDispTab.cell(':eq(0)').focus();
But I choose the last entry:
Then, when adding the KeyTable function, the up arrow key selects the bottom row and the down arrow key selects the top row; even so my table's inner scroll works fine (up arrow - scroll up, arrow down, scroll down).
I don't know what datatable config I need to change to fix this.
PD: If necessary, this is what I initialized my datatable:
gruposDispTab = $('#gruposSelect').DataTable({
//deferRender: true,
scrollY: 215,
scrollX: false,
scrollCollapse: true,
scroller: true,
dom: 't',
sScrollInner: 702,
bPaginate: false,
info: false,
"destroy": true,
"keys": true,
searching: true,
//orderCellsTop: true,
"language": {
"search": "Buscar: ",
"zeroRecords": "No se encontraron coincidencias",
"info": "Mostrando página _PAGE_ de _PAGES_"
}
});
+3
source to share