Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
d739bd1
chore: added caching layer for table widget data
Mar 13, 2025
b571cd1
fix: linting errors
Mar 13, 2025
072a4d1
Merge branch 'release' of github.com:appsmithorg/appsmith into chore/…
Mar 18, 2025
e032afc
Merge branch 'release' of github.com:appsmithorg/appsmith into chore/…
Mar 19, 2025
0ac4132
fix: merge from release, conflict resolve
Mar 24, 2025
b33d28f
chore: implement caching data
Mar 25, 2025
fb74765
Merge branch 'release' of github.com:appsmithorg/appsmith into chore/…
Mar 25, 2025
c5b6570
chore: implement caching data
Mar 25, 2025
2c7a97e
chore: test fixes
Mar 25, 2025
33119f8
chore: test fixes
Mar 25, 2025
83cbb39
Merge branch 'release' of github.com:appsmithorg/appsmith into chore/…
Mar 26, 2025
3527b8c
chore: test fixes
Mar 26, 2025
a8f30a8
chore: fix conditional caching data
Mar 28, 2025
332272d
Merge branch 'release' of github.com:appsmithorg/appsmith into chore/…
Mar 28, 2025
f310a2b
chore: updated cached data on flag infinite scroll changes, on mounti…
Mar 28, 2025
e90d04a
Merge branch 'release' of github.com:appsmithorg/appsmith into chore/…
Mar 28, 2025
9a48249
feat: added comments, changed condition for updating end of data
Mar 31, 2025
efead6b
feat: updated the end of data condition
Mar 31, 2025
8b59f5b
feat: updated the end of data condition
Mar 31, 2025
47b2775
Merge branch 'release' of github.com:appsmithorg/appsmith into chore/…
Mar 31, 2025
ca5081a
feat: updated the end of data condition
Mar 31, 2025
5629567
fix: added commitBatchMetaUpdates to push in the changes for infinite…
Apr 1, 2025
3812d2c
fix: updated has more data condition
Apr 1, 2025
51faddb
Merge branch 'release' of github.com:appsmithorg/appsmith into chore/…
Apr 1, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion app/client/src/widgets/TableWidgetV2/component/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,11 @@ export function Table(props: TableProps) {
{isHeaderVisible && <TableHeader />}
<div className={getTableWrapClassName} ref={tableWrapperRef}>
<div {...getTableProps()} className="table column-freeze">
{shouldUseVirtual ? <VirtualTable /> : <StaticTable />}
{shouldUseVirtual ? (
<VirtualTable ref={scrollBarRef} />
) : (
<StaticTable />
)}
</div>
</div>
</TableWrapper>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ const mockTableProviderProps = {
showConnectDataOverlay: false,
onConnectData: jest.fn(),
isInfiniteScrollEnabled: false,
endOfData: false,
};

// Test components
Expand Down Expand Up @@ -206,6 +207,7 @@ describe("TableContext", () => {
"showConnectDataOverlay",
"onConnectData",
"isInfiniteScrollEnabled",
"endOfData",
].sort();

const result = Object.keys(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ const BaseVirtualList = React.memo(function BaseVirtualList({
rowNeedsMeasurement={rowNeedsMeasurement}
/>
);
}, [listRef, rowHeights, rowNeedsMeasurement]);
}, [listRef, rowHeights, rowNeedsMeasurement, hasMoreData]);

return (
<VariableSizeList
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import React, { type Ref } from "react";
import React, { useMemo, type Ref } from "react";
import { type ReactElementType } from "react-window";
import type SimpleBar from "simplebar-react";
import { LoadingIndicator } from "../../LoadingIndicator";
import { VariableInfiniteVirtualList } from "../../TableBodyCoreComponents/VirtualList";
import { useAppsmithTable } from "../../TableContext";
import { useInfiniteVirtualization } from "./useInfiniteVirtualization";

interface InfiniteScrollBodyProps {
innerElementType: ReactElementType;
Expand All @@ -13,6 +12,7 @@ interface InfiniteScrollBodyProps {
const InfiniteScrollBodyComponent = React.forwardRef(
(props: InfiniteScrollBodyProps, ref: Ref<SimpleBar>) => {
const {
endOfData,
height,
isLoading,
nextPageClick,
Expand All @@ -21,24 +21,24 @@ const InfiniteScrollBodyComponent = React.forwardRef(
tableSizes,
totalRecordsCount,
} = useAppsmithTable();
const { cachedRows, hasMoreData, itemCount } = useInfiniteVirtualization({
rows,
totalRecordsCount,
loadMore: nextPageClick,
pageSize,
});

const itemCount = useMemo(() => {
return totalRecordsCount && totalRecordsCount > 0
? totalRecordsCount
: rows.length;
}, [totalRecordsCount, rows]);

return (
<div className="simplebar-content-wrapper">
<VariableInfiniteVirtualList
hasMoreData={hasMoreData}
hasMoreData={!endOfData}
height={height}
innerElementType={props.innerElementType}
itemCount={itemCount}
loadMore={nextPageClick}
outerRef={ref}
pageSize={pageSize}
rows={cachedRows}
rows={rows}
tableSizes={tableSizes}
/>
{isLoading && <LoadingIndicator />}
Expand Down

This file was deleted.

This file was deleted.

Loading
Loading