# Class TableDataSourceDirective<Data>

#### Type Parameters

- Data extends Record<string, any> = any

#### Implements

- OnInit
- OnDestroy

- Defined in packages/angular/material/table-system/src/lib/table-data-source.directive.ts:62

#####
Index

### Constructors

constructor

### Properties

_subscription
_tableFilter
adapterFactory
cdr
dataSource?
error$
hasError$
id
loading$
matSort
matTable
method?
paginator?
parameters?
sourceDataSource
sourceMethod
tableFilter

### Accessors

lastRefreshed
remoteMethod
setDataSource
sourceRemoteMethod

### Methods

ngOnDestroy
ngOnInit
refresh
reset
retry
trackBy

## Constructors

### constructor

- new TableDataSourceDirective<Data>(matTable, cdr, sourceMethod, sourceDataSource, adapterFactory, matSort, tableFilter, _tableFilter): TableDataSourceDirective<Data>

- #### Type Parameters

  - Data extends Record<string, any> = any

  #### Parameters

  - matTable: CdkTable<Data>
  - cdr: ChangeDetectorRef
  - sourceMethod: Method<any, any>
  - sourceDataSource: AbstractTableDataSource<Data, any>
  - adapterFactory: any
  - matSort: MatSort
  - tableFilter: TableFilterService
  - _tableFilter: FilterLike

  #### Returns TableDataSourceDirective<Data>

  - Defined in packages/angular/material/table-system/src/lib/table-data-source.directive.ts:119

## Properties

### `Protected` _subscription

_subscription: Subscription = ...

- Defined in packages/angular/material/table-system/src/lib/table-data-source.directive.ts:114

### `Private` `Readonly` _tableFilter

_tableFilter: FilterLike

- Defined in packages/angular/material/table-system/src/lib/table-data-source.directive.ts:141

### `Private` `Readonly` adapterFactory

adapterFactory: TableRemoteMethodAdapterFactory<Data> = null

- Defined in packages/angular/material/table-system/src/lib/table-data-source.directive.ts:116

### `Protected` `Readonly` cdr

cdr: ChangeDetectorRef

- Defined in packages/angular/material/table-system/src/lib/table-data-source.directive.ts:122

### `Optional` dataSource

dataSource?: AbstractTableDataSource<Data, any>

- Defined in packages/angular/material/table-system/src/lib/table-data-source.directive.ts:85

### `Readonly` error$

error$: Subject<unknown> = ...

- Defined in packages/angular/material/table-system/src/lib/table-data-source.directive.ts:91

### `Readonly` hasError$

hasError$: ToggleSubject = ...

- Defined in packages/angular/material/table-system/src/lib/table-data-source.directive.ts:89

### id

id: string

- Defined in packages/angular/material/table-system/src/lib/table-data-source.directive.ts:81

### `Readonly` loading$

loading$: ToggleSubject = ...

- Defined in packages/angular/material/table-system/src/lib/table-data-source.directive.ts:78

### `Private` `Readonly` matSort

matSort: MatSort

- Defined in packages/angular/material/table-system/src/lib/table-data-source.directive.ts:135

### `Private` `Readonly` matTable

matTable: CdkTable<Data>

- Defined in packages/angular/material/table-system/src/lib/table-data-source.directive.ts:121

### `Optional` method

method?: Method<Data[], TableEvent<any>>

- Defined in packages/angular/material/table-system/src/lib/table-data-source.directive.ts:87

### `Optional` paginator

paginator?: MatPaginator

- Defined in packages/angular/material/table-system/src/lib/table-data-source.directive.ts:76

### `Optional` parameters

parameters?: Observable<Record<string, any>>

- Defined in packages/angular/material/table-system/src/lib/table-data-source.directive.ts:83

### `Private` `Readonly` sourceDataSource

sourceDataSource: AbstractTableDataSource<Data, any>

- Defined in packages/angular/material/table-system/src/lib/table-data-source.directive.ts:129

### `Private` `Readonly` sourceMethod

sourceMethod: Method<any, any>

- Defined in packages/angular/material/table-system/src/lib/table-data-source.directive.ts:125

### `Private` `Readonly` tableFilter

tableFilter: TableFilterService

- Defined in packages/angular/material/table-system/src/lib/table-data-source.directive.ts:138

## Accessors

### lastRefreshed

- get lastRefreshed(): Date

- #### Returns Date

  - Defined in packages/angular/material/table-system/src/lib/table-data-source.directive.ts:93

### remoteMethod

- get remoteMethod(): Method<Data[], TableEvent<any>>

- #### Returns Method<Data[], TableEvent<any>>

  #### Deprecated

  use method instead

  - Defined in packages/angular/material/table-system/src/lib/table-data-source.directive.ts:100

### setDataSource

- set setDataSource(dataSource): void

- #### Parameters

  - dataSource: "" | AbstractTableDataSource<Data, any>

  #### Returns void

  #### Deprecated

  use dataSource instead

  - Defined in packages/angular/material/table-system/src/lib/table-data-source.directive.ts:69

### sourceRemoteMethod

- get sourceRemoteMethod(): Method<any, any>

- #### Returns Method<any, any>

  #### Deprecated

  use sourceMethod instead

  - Defined in packages/angular/material/table-system/src/lib/table-data-source.directive.ts:107

## Methods

### ngOnDestroy

- ngOnDestroy(): void

- #### Returns void

  Implementation of OnDestroy.ngOnDestroy

  - Defined in packages/angular/material/table-system/src/lib/table-data-source.directive.ts:231

### ngOnInit

- ngOnInit(): void

- #### Returns void

  Implementation of OnInit.ngOnInit

  - Defined in packages/angular/material/table-system/src/lib/table-data-source.directive.ts:154

### refresh

- refresh(): void

- #### Returns void

  - Defined in packages/angular/material/table-system/src/lib/table-data-source.directive.ts:235

### reset

- reset(): void

- #### Returns void

  - Defined in packages/angular/material/table-system/src/lib/table-data-source.directive.ts:243

### retry

- retry(): void

- #### Returns void

  - Defined in packages/angular/material/table-system/src/lib/table-data-source.directive.ts:239

### `Private` trackBy

- trackBy(index, item): string | number

- #### Parameters

  - index: number
  - item: Data

  #### Returns string | number

  - Defined in packages/angular/material/table-system/src/lib/table-data-source.directive.ts:150