Skip to content

Commit

Permalink
(#2945) Don't animate table scrolls
Browse files Browse the repository at this point in the history
Animations on large datasets show the wrong final row
  • Loading branch information
squaregoldfish committed Aug 20, 2024
1 parent 19d67ce commit de15b70
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions WebApp/WebContent/resources/script/plotPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -976,16 +976,14 @@ function scrollToTableRow(rowId) {
tableRow = JSON.parse($('#plotPageForm\\:rowIDs').val()).indexOf(rowId);
}

console.log(tableRow);
if (tableRow >= 0) {
jsDataTable.scroller().scrollToRow(tableRow - 2);

// Because we scroll to the row - 2, we know that the
// row we want to highlight is the third row
tableScrollRow = rowId;
// Because we scroll to the row - 2, we know that the
// row we want to highlight is the third row
jsDataTable.scroller.toPosition(tableRow - 2, false);
tableScrollRow = rowId;

// The highlight is done as part of the table draw callback
}
}
}

function highlightRow(rowId) {
Expand Down

0 comments on commit de15b70

Please sign in to comment.