Fixed #5783 - Datatable: Focus issue on tab
parent
508428fdc7
commit
4e476df1bd
|
@ -390,39 +390,31 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
findPreviousEditableColumn(cell) {
|
findPreviousEditableColumn(cell) {
|
||||||
let prevCell = cell.previousElementSibling;
|
let prevCell = cell?.previousElementSibling;
|
||||||
|
|
||||||
if (!prevCell) {
|
if (!prevCell) {
|
||||||
let previousRow = cell.parentElement.previousElementSibling;
|
let previousRow = cell?.parentElement.previousElementSibling;
|
||||||
|
|
||||||
if (previousRow) {
|
if (previousRow) {
|
||||||
prevCell = previousRow.lastElementChild;
|
prevCell = previousRow.lastElementChild;
|
||||||
}
|
} else return null;
|
||||||
}
|
} else {
|
||||||
|
|
||||||
if (prevCell) {
|
|
||||||
if (DomHandler.getAttribute(prevCell, 'data-p-editable-column')) return prevCell;
|
if (DomHandler.getAttribute(prevCell, 'data-p-editable-column')) return prevCell;
|
||||||
else return this.findPreviousEditableColumn(prevCell);
|
else return this.findPreviousEditableColumn(prevCell);
|
||||||
} else {
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
findNextEditableColumn(cell) {
|
findNextEditableColumn(cell) {
|
||||||
let nextCell = cell.nextElementSibling;
|
let nextCell = cell?.nextElementSibling;
|
||||||
|
|
||||||
if (!nextCell) {
|
if (!nextCell) {
|
||||||
let nextRow = cell.parentElement.nextElementSibling;
|
let nextRow = cell?.parentElement.nextElementSibling;
|
||||||
|
|
||||||
if (nextRow) {
|
if (nextRow) {
|
||||||
nextCell = nextRow.firstElementChild;
|
nextCell = nextRow.firstElementChild;
|
||||||
}
|
} else return null;
|
||||||
}
|
} else {
|
||||||
|
|
||||||
if (nextCell) {
|
|
||||||
if (DomHandler.getAttribute(nextCell, 'data-p-editable-column')) return nextCell;
|
if (DomHandler.getAttribute(nextCell, 'data-p-editable-column')) return nextCell;
|
||||||
else return this.findNextEditableColumn(nextCell);
|
else return this.findNextEditableColumn(nextCell);
|
||||||
} else {
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onRowEditInit(event) {
|
onRowEditInit(event) {
|
||||||
|
|
Loading…
Reference in New Issue