Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BufferedPager

Implements Pager contract and represents buffered list behavior.

note

This type is configured to use with FiltersService.

Hierarchy

  • BufferedPager

Implements

Index

Properties

appendedOnLoad

appendedOnLoad: boolean = true

Must be true for such pager implementations which destroy previously loaded data only on full reload and keep data on next chunk loading.

defaultRowCount

defaultRowCount: number = BufferedPager.settings.defaultRowCount

This is both initial value and value which will be applied to takeRowCount property on reset method execution.

Private handlesFlatResponse

handlesFlatResponse: boolean = false

Private lastChunkRecieved

lastChunkRecieved: boolean = null

loadedCount

loadedCount: number = 0

Count of records that was loaded at last request.

see

ListResponse.loadedCount

maxRowCount

maxRowCount: number = BufferedPager.settings.maxRowCount

The biggest value that can be applied to takeRowCount property.

minRowCount

minRowCount: number = BufferedPager.settings.minRowCount

The smallest value that can be applied to takeRowCount property.

skip

skip: number = 0

This property is applied to the server request and it specifies how many rows are already loaded and must be skipped on next request.

note

This property is ready to use with FiltersService since it has filter annotation.

see

{@link BufferedListRequest.skip}

Protected takeRowCountInternal

takeRowCountInternal: number = BufferedPager.settings.defaultRowCount

Internal implementation of takeRowCount.

totalCount

totalCount: number = 0

Total count of records in remote data source.

see

ListResponse.totalCount

Accessors

canLoadMore

  • get canLoadMore(): boolean
  • Returns true if it's possible to load more records (e.g. currently not all records loaded to the list).

    Returns boolean

takeRowCount

  • get takeRowCount(): number
  • set takeRowCount(value: number): void
  • This property is applied to the server request and it specifies how many rows must be loaded on next request.

    note

    This property is ready to use with FiltersService since it has filter annotation.

    see

    {@link BufferedListRequest.take}

    Returns number

  • Executes several checks. For example, it doesn't accept values bigger than maxRowCount.

    Parameters

    • value: number

    Returns void

Methods

processResponse

  • processResponse(response: ListResponse<any> | any[]): void

reset

  • reset(): void

Object literals

Static settings

settings: object

Global settings for properties such as default values and constraints for pager properties.

These settings are static and their values are copied to the properties of the same name for each instance of BufferedPager type.

So, changing of this settings will affect all instances of BufferedPager type that will be created after such changes. If you want to change settings of concrete object you can use it the same name properties.

defaultRowCount

defaultRowCount: number = 20

maxRowCount

maxRowCount: number = 200

minRowCount

minRowCount: number = 1

Generated using TypeDoc