BaseListComponent
This is a base class which implements the logic required to fetch and manipulate a list of data from a query which returns a PaginatedList type.
It is normally used in combination with the DataTable2Component.
- Implements: OnInit, OnDestroy
searchTermControl
property
selectionManager
property
result$
property
Observable<ResultType>items$
property
Observable<ItemType[]>totalItems$
property
Observable<number>itemsPerPage$
property
Observable<number>currentPage$
property
Observable<number>destroy$
property
refresh$
property
visibleCustomFieldColumnChange$
property
constructor
method
(router: Router, route: ActivatedRoute) => BaseListComponentsetQueryFn
method
(listQueryFn: ListQueryFn<ResultType>, mappingFn: MappingFn<ItemType, ResultType>, onPageChangeFn?: OnPageChangeFn<VariableType>, defaults?: { take: number; skip: number }) => Sets the fetch function for the list being implemented.
refreshListOnChanges
method
(streams: Array<Observable<any>>) => Accepts a list of Observables which will trigger a refresh of the list when any of them emit.
setPageNumber
method
(page: number) => Sets the current page number in the url.
setItemsPerPage
method
(perPage: number) => Sets the number of items per page in the url.
setVisibleColumns
method
(columns: Array<DataTable2ColumnComponent<any>>) => refresh
method
() => Re-fetch the current page of results.
setQueryParam
method
(hash: { [key: string]: any }, options?: { replaceUrl?: boolean; queryParamsHandling?: QueryParamsHandling }) => setQueryParam
method
(key: string, value: any, options?: { replaceUrl?: boolean; queryParamsHandling?: QueryParamsHandling }) => setQueryParam
method
(keyOrHash: string | { [key: string]: any }, valueOrOptions?: any, maybeOptions?: { replaceUrl?: boolean; queryParamsHandling?: QueryParamsHandling }) => Was this chapter helpful?