Skip to content

Commit 5ee963a

Browse files
docs(data-widgets): document why resolveInitPageSize returns 0 for dynamic page size
1 parent b7a878b commit 5ee963a

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

packages/pluggableWidgets/datagrid-web/src/features/pagination/pagination.config.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ export function paginationConfig(props: MainGateProps): PaginationConfig {
3737
return Object.freeze(config);
3838
}
3939

40+
/**
41+
* Resolves the initial page size for the first datasource fetch.
42+
* Returns 0 when `dynamicPageSize` is configured so that no rows are fetched
43+
* before the attribute value is available — the real limit is applied once
44+
* `DynamicPaginationFeature` syncs the attribute on setup.
45+
*/
4046
export function resolveInitPageSize(props: MainGateProps): number {
4147
if (props.dynamicPageSize !== undefined) {
4248
return 0;

packages/pluggableWidgets/gallery-web/src/model/configs/GalleryPagination.config.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ export function galleryPaginationConfig(props: GalleryGateProps): GalleryPaginat
3939
return Object.freeze(config);
4040
}
4141

42+
/**
43+
* Resolves the initial page size for the first datasource fetch.
44+
* Returns 0 when `dynamicPageSize` is configured so that no rows are fetched
45+
* before the attribute value is available — the real limit is applied once
46+
* `DynamicPaginationFeature` syncs the attribute on setup.
47+
*/
4248
export function resolveInitPageSize(props: GalleryGateProps): number {
4349
if (props.dynamicPageSize !== undefined) {
4450
return 0;

0 commit comments

Comments
 (0)