Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "ui/paging/Paging"

Index

Type aliases

Props

Props: object

Type declaration

  • onPagingChange: function
      • (current: number, pageSize?: undefined | number): void
      • Parameters

        • current: number
        • Optional pageSize: undefined | number

        Returns void

  • paginationConfig: PaginationConfig
  • Optional total?: undefined | number

Functions

addPagingParams

  • addPagingParams(url: string, current: number | undefined, pageSize: number | undefined): string
  • Add paging params at the end of url string. Returns url with Note - expects that url has no params, so this method add '?' before params.

    Parameters

    • url: string

      params will be added to this url

    • current: number | undefined

      current page

    • pageSize: number | undefined

      page size

    Returns string

createPagingConfig

  • createPagingConfig(urlParams: string, disabled?: boolean, prevConfig?: PaginationConfig): object | object
  • Parameters

    • urlParams: string

      query params from 'location.history'

    • Default value disabled: boolean = false

      set to true, if no pagination required for component

    • Default value prevConfig: PaginationConfig = defaultPagingConfig

      previous paging configuration, by default used Paging#defaultPagingConfig

    Returns object | object

parseIntParam

  • parseIntParam(param: string | string[] | null | undefined, defaultValue: number | undefined): number | undefined

parsePagingParams

  • parsePagingParams(locationSearch: string, currentPrev: number | undefined, pageSizePrev: number | undefined): PaginationConfig
  • Returns new PaginationConfig object with 'current' and 'pageSize' params, parsed from location.search. If param not found in search url, previous value (currentPrev, pageSizePrev) will be returned. If new pageSize not contains in config pageSizeOptions - previous config will be returned.

    Parameters

    • locationSearch: string

      trying to find paging params here

    • currentPrev: number | undefined

      previous value, will be returned in result if new value not found in locationSearch

    • pageSizePrev: number | undefined

      previous value, will be returned in result if new value not found in locationSearch

    Returns PaginationConfig

setPagination

  • setPagination<E>(pagination: PaginationConfig | TablePaginationConfig, dataCollection: DataCollectionStore<E>, reload?: boolean): void
  • Apply paginationConfig to collectionDataStore, reload dataStore if required

    Type parameters

    • E

    Parameters

    • pagination: PaginationConfig | TablePaginationConfig

      PaginationConfig

    • dataCollection: DataCollectionStore<E>

      -page size and current page will be set to this collection data store

    • Default value reload: boolean = false

      reload collection data store, if needsr

    Returns void

Object literals

Const defaultPagingConfig

defaultPagingConfig: object

Paging defaults

current

current: number = 1

defaultPageSize

defaultPageSize: number = 10

pageSize

pageSize: number = 10

pageSizeOptions

pageSizeOptions: string[] = ['10', '20', '50', '100', '500', '1000', '5000']

showSizeChanger

showSizeChanger: true = true

Generated using TypeDoc