Fix cell navigation if rows are hidden
This commit is contained in:
parent
128a674ad6
commit
9eaa81f89d
@ -567,8 +567,13 @@ export default class CellManager {
|
||||
const {
|
||||
colIndex
|
||||
} = $.data($cell);
|
||||
const $aboveRow = $cell.parentElement.previousElementSibling;
|
||||
|
||||
let $aboveRow = $cell.parentElement.previousElementSibling;
|
||||
while ($aboveRow && $aboveRow.classList.contains('hide')) {
|
||||
$aboveRow = $aboveRow.previousElementSibling;
|
||||
}
|
||||
|
||||
if (!$aboveRow) return $cell;
|
||||
return $(`[data-col-index="${colIndex}"]`, $aboveRow);
|
||||
}
|
||||
|
||||
@ -576,8 +581,13 @@ export default class CellManager {
|
||||
const {
|
||||
colIndex
|
||||
} = $.data($cell);
|
||||
const $belowRow = $cell.parentElement.nextElementSibling;
|
||||
|
||||
let $belowRow = $cell.parentElement.nextElementSibling;
|
||||
while ($belowRow && $belowRow.classList.contains('hide')) {
|
||||
$belowRow = $belowRow.nextElementSibling;
|
||||
}
|
||||
|
||||
if (!$belowRow) return $cell;
|
||||
return $(`[data-col-index="${colIndex}"]`, $belowRow);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user