Skip to content

Commit

Permalink
code refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
BabyElias committed Aug 16, 2024
1 parent fefcad1 commit 21cc84d
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions lib/KTable/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -306,10 +306,6 @@
this.focusedColIndex = nextColIndex;
this.highlightHeader(nextColIndex);
const cell = this.$el.querySelector(
`tbody tr:nth-child(${nextRowIndex + 1}) td:nth-child(${nextColIndex + 1})`
);
this.scrollCellIntoView(cell);
event.preventDefault();
},
Expand Down Expand Up @@ -347,10 +343,11 @@
}
// Ensured the focused cell is smoothly scrolled into view.
if (nextCell) {
nextCell.focus();
nextCell.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'nearest' });
}
nextCell.focus();
this.scrollCellIntoView(nextCell);
}
},
handleRowMouseOver(rowIndex) {
this.hoveredRowIndex = rowIndex;
},
Expand Down

0 comments on commit 21cc84d

Please sign in to comment.