mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
fix: infinity scrolling of bank account transactions
This commit is contained in:
@@ -25,14 +25,13 @@ function TableVirtualizedListRow({ index, isScrolling, isVisible, style }) {
|
||||
export function TableVirtualizedListRows() {
|
||||
const {
|
||||
table: { page },
|
||||
props: { vListrowHeight, vListOverscanRowCount },
|
||||
props: { vListrowHeight, vListOverscanRowCount, windowScrollerProps },
|
||||
} = useContext(TableContext);
|
||||
|
||||
// Dashboard content pane.
|
||||
const dashboardContentPane = React.useMemo(
|
||||
() => document.querySelector(`.${CLASSES.DASHBOARD_CONTENT_PANE}`),
|
||||
[],
|
||||
);
|
||||
const scrollElement =
|
||||
windowScrollerProps?.scrollElement ||
|
||||
document.querySelector(`.${CLASSES.DASHBOARD_CONTENT_PANE}`);
|
||||
|
||||
const rowRenderer = React.useCallback(
|
||||
({ key, ...args }) => <TableVirtualizedListRow {...args} key={key} />,
|
||||
@@ -40,7 +39,7 @@ export function TableVirtualizedListRows() {
|
||||
);
|
||||
|
||||
return (
|
||||
<WindowScroller scrollElement={dashboardContentPane}>
|
||||
<WindowScroller scrollElement={scrollElement}>
|
||||
{({ height, isScrolling, onChildScroll, scrollTop }) => (
|
||||
<AutoSizer disableHeight>
|
||||
{({ width }) => (
|
||||
|
||||
Reference in New Issue
Block a user