Skip to content

Commit

Permalink
updated queryselector with refs
Browse files Browse the repository at this point in the history
  • Loading branch information
BabyElias committed Aug 25, 2024
1 parent e43678c commit 0b1b1dc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/KTable/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{{ caption }}
</caption>
<thead>
<tr>
<tr ref="stickyHeader">
<th
v-for="(header, index) in headers"
:ref="'header-' + index"
Expand Down Expand Up @@ -414,8 +414,8 @@
cell.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'nearest' });
// Adjust scroll position to account for sticky headers
const stickyHeader = this.$el.querySelector('.sticky-header');
const stickyColumn = this.$el.querySelector('.sticky-column');
const stickyHeader = this.$refs.stickyHeader;
const stickyColumn = this.$refs['header-0'][0];
const tableWrapper = this.$refs.tableWrapper;
const stickyHeaderHeight = stickyHeader ? stickyHeader.offsetHeight : 0;
Expand Down

0 comments on commit 0b1b1dc

Please sign in to comment.