mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-24 14:25:00 +00:00
fix: Correctly select table body element
This commit is contained in:
parent
85218d74d4
commit
e4e16b8f77
1 changed files with 2 additions and 2 deletions
|
@ -41,7 +41,7 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||
leaderboardChart.update();
|
||||
}
|
||||
|
||||
var tableBody = document.querySelectorAll('table tbody')[1];
|
||||
var tableBody = document.querySelector('table tbody');
|
||||
allData.forEach(function(row, index) {
|
||||
var tr = tableBody.children[index];
|
||||
tr.id = 'refac-row-' + index;
|
||||
|
@ -69,7 +69,7 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||
// Add search functionality for refactoring table
|
||||
document.getElementById('refacSearchInput').addEventListener('keyup', function() {
|
||||
var searchWords = this.value.toLowerCase().split(' ').filter(word => word.length > 0);
|
||||
var tableBody = document.querySelectorAll('table tbody')[1];
|
||||
var tableBody = document.querySelector('table tbody');
|
||||
var rows = tableBody.getElementsByTagName('tr');
|
||||
|
||||
leaderboardData.labels = [];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue