Skip to content

Commit 295bf74

Browse files
committed
chore: restore config
1 parent e7eb207 commit 295bf74

2 files changed

Lines changed: 13 additions & 4 deletions

File tree

packages/pluggableWidgets/datagrid-web/src/components/WidgetFooter.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,11 @@ export const WidgetFooter = observer(function WidgetFooter(): ReactElement | nul
1313
const selectionCounterVM = useSelectionCounterViewModel();
1414
const customPagination = useCustomPagination();
1515

16-
const showLoadMore = paging.hasMoreItems && paging.pagination === "loadMore";
1716
const showFooter =
1817
selectionCounterVM.isBottomCounterVisible ||
19-
showLoadMore ||
20-
paging.pagination !== "virtualScrolling" ||
21-
pgConfig.customPaginationEnabled;
18+
paging.paginationVisible ||
19+
paging.showVirtualScrollingWithRowCount ||
20+
paging.showLoadMore;
2221

2322
if (!showFooter) {
2423
return null;

packages/pluggableWidgets/datagrid-web/src/features/pagination/Pagination.viewModel.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ export class PaginationViewModel {
2222
pageSize: computed,
2323
currentPage: computed,
2424
paginationVisible: computed,
25+
showLoadMore: computed,
26+
showVirtualScrollingWithRowCount: computed,
2527
hasMoreItems: computed,
2628
totalCount: computed
2729
});
@@ -51,6 +53,14 @@ export class PaginationViewModel {
5153
}
5254
}
5355

56+
get showLoadMore(): boolean {
57+
return this.hasMoreItems && this.pagination === "loadMore";
58+
}
59+
60+
get showVirtualScrollingWithRowCount(): boolean {
61+
return this.pagination === "virtualScrolling" && this.config.showNumberOfRows;
62+
}
63+
5464
get hasMoreItems(): boolean {
5565
return this.query.hasMoreItems;
5666
}

0 commit comments

Comments
 (0)