# 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
cdr
dataSource?
error$
hasError$
id
loading$
method?
paginator?
parameters?

### Accessors

lastRefreshed
remoteMethod
setDataSource
sourceRemoteMethod

### Methods

ngOnDestroy
ngOnInit
refresh
reset
retry

##
Constructors

### constructor

- new TableDataSourceDirective<Data extends Record<string, any> = any>(
  matTable: CdkTable<Data>,
  cdr: ChangeDetectorRef,
  sourceMethod: null | Method<any, any>,
  sourceDataSource: null | AbstractTableDataSource<Data, any>,
  adapterFactory: any,
  matSort: null | MatSort,
  tableFilter: null | TableFilterService,
  _tableFilter: null | FilterLike,
  ): TableDataSourceDirective<Data>

  #### Type Parameters

  - Data extends Record<string, any> = any

  #### Parameters

  - matTable: CdkTable<Data>
  - cdr: ChangeDetectorRef
  - sourceMethod: null | Method<any, any>
  - sourceDataSource: null | AbstractTableDataSource<Data, any>
  - adapterFactory: any
  - matSort: null | MatSort
  - tableFilter: null | TableFilterService
  - _tableFilter: null | 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

### `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

### `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

##
Accessors

### lastRefreshed

- get lastRefreshed(): null | Date

  #### Returns null | Date

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

### remoteMethod

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

  #### Returns undefined | 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: "" | AbstractTableDataSource<Data, any>): 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(): null | Method<any, any>

  #### Returns null | 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

  A callback method that performs custom clean-up, invoked immediately before a directive, pipe, or service instance is destroyed.

  #### Returns void

  Implementation of OnDestroy.ngOnDestroy

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

### ngOnInit

- ngOnInit(): void

  A callback method that is invoked immediately after the default change detector has checked the directive's data-bound properties for the first time, and before any of the view or content children have been checked. It is invoked only once when the directive is instantiated.

  #### 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