fix ROWY-700

This commit is contained in:
Sidney Alcantara
2022-10-06 15:15:28 +11:00
parent f6d35991f9
commit f565cfceef

View File

@@ -176,9 +176,16 @@ export default function Table({
(event: React.UIEvent<HTMLDivElement>) => {
// Select corresponding header cell when scrolled to prevent jumping
dataGridRef?.current?.selectCell({
idx: selectedColumnIndex || 0,
idx:
selectedColumnIndex > -1 ? selectedColumnIndex : columns.length - 1,
rowIdx: -1,
});
// console.log(
// "scroll",
// dataGridRef?.current,
// selectedColumnIndex,
// columns.length
// );
const target = event.target as HTMLDivElement;