Skip to main content

DefaultCollectionBroker

Properties

(Mandatory properties are in bold)
PropertiesTypeDescription
addFilteraddFilter(filterOrCriteria: QueryFilterOrCriteria,parentFilterId: QueryFilterId,subscriberId: string): void
addFilterCriteriaaddFilterCriteria(field: string,operator: QueryFilterCriteriaOperator,value: null | string | number | boolean | QueryFilterCriteriaValue[],not: boolean,id: string | number | symbol,parentFilterId: string | number | symbol,subscriberId: string): void
addSortByaddSortBy(sortBy: QuerySortBy,prepend: boolean,subscriberId: string): void
addSubscriberaddSubscriber(subscriberId: string,subscriber: C): void
clearFieldsclearFields(subscriberId: string): void
clearFilterclearFilter(subscriberId: string): void
clearParamclearParam(key: string,subscriberId: string): void
clearParamsclearParams(subscriberId: string): void
clearSearchclearSearch(subscriberId: string): void
clearSortclearSort(subscriberId: string): void
clearSortByclearSortBy(subscriberId: string): void
constructornew DefaultCollectionBroker<T,I,S,C>(dataSource: undefined | string | T[],options: UseCollectionOptions<T, I>)
filterfilter(filter: QueryFilter | QueryFilterCriteria | QueryFilterOrCriteria[],subscriberId: string): void
getDatagetData(subscriberId: string): undefined | T[]
getFieldsgetFields(subscriberId: string): undefined | string[]
getFiltergetFilter(subscriberId: string): undefined | QueryFilter | QueryFilterCriteria | QueryFilterOrCriteria[]
getInitialDataSourcegetInitialDataSource(subscriberId: string): undefined | string | T[]
getInitialQuerygetInitialQuery(subscriberId: string): Query
getParamsgetParams(subscriberId: string): undefined | AnonymousObject<any>
getSearchgetSearch(subscriberId: string): undefined | Primitive
getSortgetSort(subscriberId: string): undefined | QuerySortDir
getSortBygetSortBy(subscriberId: string): undefined | string | QuerySortBy | QuerySortBy[]
getUrlgetUrl(subscriberId: string): undefined | string
removeFilterremoveFilter(id: QueryFilterId,subscriberId: string): void
removeSortByremoveSortBy(id: string,subscriberId: string): void
removeSubscriberremoveSubscriber(id: string): void
searchsearch(search: Primitive,subscriberId: string): void
setDatasetData(data: T[],query: Query,subscriberId: string): void
setFieldssetFields(fields: string[],subscriberId: string): void
setParamsetParam(key: string,value: any,subscriberId: string): void
setParamssetParams(params: AnonymousObject<any>,subscriberId: string): void
setUrlsetUrl(url: string,query: Query,subscriberId: string): void
sortsort(dir: QuerySortDir,subscriberId: string): void
sortBysortBy(sortBy: string | QuerySortBy | QuerySortBy[],subscriberId: string): void