pagingSize

Accessor

Paging options for obtaining nodes.

Presentation data providers, when used with paging, have ability to save one backend request for size / count. That can only be achieved when pagingSize property is set on the data provider and it's value matches size which is used when requesting nodes. To help developers notice this problem, data provider emits a warning similar to this:

PresentationTreeDataProvider.pagingSize doesn't match pageOptions in PresentationTreeDataProvider.getNodes call. Make sure you set PresentationTreeDataProvider.pagingSize to avoid excessive backend requests.

To fix the issue, developers should make sure the page size used for requesting data is also set for the data provider:

const pageSize = 10;
const provider = new TreeDataProvider(imodel, rulesetId);
provider.pagingSize = pageSize;
// only one backend request is made for the two following requests:
provider.getNodesCount();
provider.getNodes({ start: 0, size: pageSize });

get: number | undefined

Returns - number | undefined


Setter

Paging options for obtaining nodes.

Presentation data providers, when used with paging, have ability to save one backend request for size / count. That can only be achieved when pagingSize property is set on the data provider and it's value matches size which is used when requesting nodes. To help developers notice this problem, data provider emits a warning similar to this:

PresentationTreeDataProvider.pagingSize doesn't match pageOptions in PresentationTreeDataProvider.getNodes call. Make sure you set PresentationTreeDataProvider.pagingSize to avoid excessive backend requests.

To fix the issue, developers should make sure the page size used for requesting data is also set for the data provider:

const pageSize = 10;
const provider = new TreeDataProvider(imodel, rulesetId);
provider.pagingSize = pageSize;
// only one backend request is made for the two following requests:
provider.getNodesCount();
provider.getNodes({ start: 0, size: pageSize });

set(value: number | undefined): void

Parameter Type Description
value number | undefined  

Returns - void

Defined in

Last Updated: 13 June, 2024