Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Commit

Permalink
Update scroll alignment in TaskQueueTable
Browse files Browse the repository at this point in the history
  • Loading branch information
khelif96 committed Feb 28, 2024
1 parent acb6635 commit c94e4af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pages/taskQueue/TaskQueueTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ const TaskQueueTable: React.FC<TaskQueueTableProps> = ({
if (taskId !== undefined && !performedInitialScroll.current) {
const i = taskQueue.findIndex((t) => t.id === taskId);
setSelectedRowIndexes([i]);
table.scrollToIndex(i, { align: "center" });
table.scrollToIndex(i, { align: "start" });

setTimeout(() => {
performedInitialScroll.current = true;
table.scrollToIndex(i, { align: "center" });
table.scrollToIndex(i, { align: "start" });
}, 200);
}
// eslint-disable-next-line react-hooks/exhaustive-deps
Expand Down

0 comments on commit c94e4af

Please sign in to comment.