### Type parameters

- #### T

- #### R: QueryRequest<T> | ScanRequest<T>

- #### O: QueryResponse<T> | ScanResponse<T>

### Hierarchy

- PagedDataSource

## Index

### Constructors

- constructor

### Properties

- count$
- data
- hasMore$
- lastKey
- loading$
- loadingSubject
- meta$
- metaSubject
- nextSubject
- pageSize

### Methods

- addItem
- editItem
- fetchData
- next
- removeItem
- reset

## Constructors

### constructor

- new PagedDataSource(request$: Observable<Pageable<T, R, O>>, pageSize?: number): PagedDataSource

- - Defined in dynamo/paged/paged-data-source.ts:29

  #### Parameters

  - ##### request$: Observable<Pageable<T, R, O>>

  - ##### Default value pageSize: number = 50

  #### Returns PagedDataSource

## Properties

### count$

count$: Observable<number>

- Defined in dynamo/paged/paged-data-source.ts:24

### data

data: T[] = []

- Defined in dynamo/paged/paged-data-source.ts:23

### hasMore$

hasMore$: Observable<boolean>

- Defined in dynamo/paged/paged-data-source.ts:26

### lastKey

lastKey: Key | null

- Defined in dynamo/paged/paged-data-source.ts:28

### loading$

loading$: Observable<boolean>

- Defined in dynamo/paged/paged-data-source.ts:25

### loadingSubject

loadingSubject: BehaviorSubject<boolean> = new BehaviorSubject(false)

- Defined in dynamo/paged/paged-data-source.ts:19

### meta$

meta$: Observable<PagedRequestMeta>

- Defined in dynamo/paged/paged-data-source.ts:29

### metaSubject

metaSubject: BehaviorSubject<PagedRequestMeta> = new BehaviorSubject({ current: 0, total: 0, hasMore: false })

- Defined in dynamo/paged/paged-data-source.ts:21

### nextSubject

nextSubject: Subject<void> = new Subject<void>()

- Defined in dynamo/paged/paged-data-source.ts:20

### Private pageSize

pageSize: number

- Defined in dynamo/paged/paged-data-source.ts:31

## Methods

### addItem

- addItem(item: T): void

- - Defined in dynamo/paged/paged-data-source.ts:114

  #### Parameters

  - ##### item: T

  #### Returns void

### editItem

- editItem(updatedItem: T, predicate: any): void

- - Defined in dynamo/paged/paged-data-source.ts:126

  will search for the item using _.findIndex(predicate) and replaces the found item with the updatedItem, logs an error if the item to replace could not be found

  #### Parameters

  - ##### updatedItem: T

  - ##### predicate: any

  #### Returns void

### Private fetchData

- fetchData(request: Pageable<T, R, O>): Observable<T[]>

- - Defined in dynamo/paged/paged-data-source.ts:141

  #### Parameters

  - ##### request: Pageable<T, R, O>

  #### Returns Observable<T[]>

### next

- next(): void

- - Defined in dynamo/paged/paged-data-source.ts:92

  #### Returns void

### removeItem

- removeItem(item: T): void

- - Defined in dynamo/paged/paged-data-source.ts:100

  removes the given item if it exists in data set, and updates the counter.

  #### Parameters

  - ##### item: T

  #### Returns void

### Private reset

- reset(): void

- - Defined in dynamo/paged/paged-data-source.ts:135

  #### Returns void

Generated using TypeDoc