Skip to content

Commit

Permalink
fix: scroll position in pivot (#6099)
Browse files Browse the repository at this point in the history
  • Loading branch information
djbarnwal authored Nov 20, 2024
1 parent 37c22bf commit d9e0335
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions web-common/src/features/dashboards/pivot/PivotTable.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,11 @@
];
}
function onExpandedChange(updater: Updater<ExpandedState>) {
// Something is off with tanstack's types
//@ts-expect-error-free
//eslint-disable-next-line
expanded = updater(expanded);
if (updater instanceof Function) {
expanded = updater(expanded);
} else {
expanded = updater;
}
metricsExplorerStore.setPivotExpanded($exploreName, expanded);
}
Expand All @@ -225,6 +226,7 @@
sorting = updater;
}
metricsExplorerStore.setPivotSort($exploreName, sorting);
rowScrollOffset = 0;
}
const handleScroll = (containerRefElement?: HTMLDivElement | null) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ export function createPivotDataStore(
if (rowMeasureTotalsAxesQuery?.isFetching) {
return cellSet({
isFetching: true,
data: axesRowTotals,
data: lastPivotData ? lastPivotData : axesRowTotals,
columnDef,
assembled: false,
totalColumns,
Expand Down

1 comment on commit d9e0335

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.