[**@rxap/material-table-system v19.0.2-dev.1**](../README.md)

***

[@rxap/material-table-system](../globals.md) / TableDataSourceDirective

# Class: TableDataSourceDirective\<Data\>

Defined in: [packages/angular/material/table-system/src/lib/table-data-source.directive.ts:62](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/material/table-system/src/lib/table-data-source.directive.ts#L62)

## Type Parameters

• **Data** *extends* `Record`\<`string`, `any`\> = `any`

## Implements

- `OnInit`
- `OnDestroy`

## Constructors

### new TableDataSourceDirective()

> **new TableDataSourceDirective**\<`Data`\>(`matTable`, `cdr`, `sourceMethod`, `sourceDataSource`, `adapterFactory`, `matSort`, `tableFilter`, `_tableFilter`): [`TableDataSourceDirective`](TableDataSourceDirective.md)\<`Data`\>

Defined in: [packages/angular/material/table-system/src/lib/table-data-source.directive.ts:119](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/material/table-system/src/lib/table-data-source.directive.ts#L119)

#### Parameters

##### matTable

`CdkTable`\<`Data`\>

##### cdr

`ChangeDetectorRef`

##### sourceMethod

`null` | `Method`\<`any`, `any`\>

##### sourceDataSource

`null` | `AbstractTableDataSource`\<`Data`, `any`\>

##### adapterFactory

`any`

##### matSort

`null` | `MatSort`

##### tableFilter

`null` | [`TableFilterService`](TableFilterService.md)

##### \_tableFilter

`null` | `FilterLike`

#### Returns

[`TableDataSourceDirective`](TableDataSourceDirective.md)\<`Data`\>

## Properties

### \_subscription

> `protected` **\_subscription**: `Subscription`

Defined in: [packages/angular/material/table-system/src/lib/table-data-source.directive.ts:114](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/material/table-system/src/lib/table-data-source.directive.ts#L114)

***

### cdr

> `protected` `readonly` **cdr**: `ChangeDetectorRef`

Defined in: [packages/angular/material/table-system/src/lib/table-data-source.directive.ts:122](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/material/table-system/src/lib/table-data-source.directive.ts#L122)

***

### dataSource?

> `optional` **dataSource**: `AbstractTableDataSource`\<`Data`, `any`\>

Defined in: [packages/angular/material/table-system/src/lib/table-data-source.directive.ts:85](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/material/table-system/src/lib/table-data-source.directive.ts#L85)

***

### error$

> `readonly` **error$**: `Subject`\<`unknown`\>

Defined in: [packages/angular/material/table-system/src/lib/table-data-source.directive.ts:91](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/material/table-system/src/lib/table-data-source.directive.ts#L91)

***

### hasError$

> `readonly` **hasError$**: `ToggleSubject`

Defined in: [packages/angular/material/table-system/src/lib/table-data-source.directive.ts:89](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/material/table-system/src/lib/table-data-source.directive.ts#L89)

***

### id

> **id**: `string`

Defined in: [packages/angular/material/table-system/src/lib/table-data-source.directive.ts:81](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/material/table-system/src/lib/table-data-source.directive.ts#L81)

***

### loading$

> `readonly` **loading$**: `ToggleSubject`

Defined in: [packages/angular/material/table-system/src/lib/table-data-source.directive.ts:78](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/material/table-system/src/lib/table-data-source.directive.ts#L78)

***

### method?

> `optional` **method**: `Method`\<`Data`[], `TableEvent`\<`any`\>\>

Defined in: [packages/angular/material/table-system/src/lib/table-data-source.directive.ts:87](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/material/table-system/src/lib/table-data-source.directive.ts#L87)

***

### paginator?

> `optional` **paginator**: `MatPaginator`

Defined in: [packages/angular/material/table-system/src/lib/table-data-source.directive.ts:76](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/material/table-system/src/lib/table-data-source.directive.ts#L76)

***

### parameters?

> `optional` **parameters**: `Observable`\<`Record`\<`string`, `any`\>\>

Defined in: [packages/angular/material/table-system/src/lib/table-data-source.directive.ts:83](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/material/table-system/src/lib/table-data-source.directive.ts#L83)

## Accessors

### lastRefreshed

#### Get Signature

> **get** **lastRefreshed**(): `null` \| `Date`

Defined in: [packages/angular/material/table-system/src/lib/table-data-source.directive.ts:93](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/material/table-system/src/lib/table-data-source.directive.ts#L93)

##### Returns

`null` \| `Date`

***

### remoteMethod

#### Get Signature

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

Defined in: [packages/angular/material/table-system/src/lib/table-data-source.directive.ts:100](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/material/table-system/src/lib/table-data-source.directive.ts#L100)

##### Deprecated

use method instead

##### Returns

`undefined` \| `Method`\<`Data`[], `TableEvent`\<`any`\>\>

***

### setDataSource

#### Set Signature

> **set** **setDataSource**(`dataSource`): `void`

Defined in: [packages/angular/material/table-system/src/lib/table-data-source.directive.ts:69](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/material/table-system/src/lib/table-data-source.directive.ts#L69)

##### Deprecated

use dataSource instead

##### Parameters

###### dataSource

`""` | `AbstractTableDataSource`\<`Data`, `any`\>

##### Returns

`void`

***

### sourceRemoteMethod

#### Get Signature

> **get** **sourceRemoteMethod**(): `null` \| `Method`\<`any`, `any`\>

Defined in: [packages/angular/material/table-system/src/lib/table-data-source.directive.ts:107](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/material/table-system/src/lib/table-data-source.directive.ts#L107)

##### Deprecated

use sourceMethod instead

##### Returns

`null` \| `Method`\<`any`, `any`\>

## Methods

### ngOnDestroy()

> **ngOnDestroy**(): `void`

Defined in: [packages/angular/material/table-system/src/lib/table-data-source.directive.ts:231](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/material/table-system/src/lib/table-data-source.directive.ts#L231)

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`

***

### ngOnInit()

> **ngOnInit**(): `void`

Defined in: [packages/angular/material/table-system/src/lib/table-data-source.directive.ts:154](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/material/table-system/src/lib/table-data-source.directive.ts#L154)

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`

***

### refresh()

> **refresh**(): `void`

Defined in: [packages/angular/material/table-system/src/lib/table-data-source.directive.ts:235](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/material/table-system/src/lib/table-data-source.directive.ts#L235)

#### Returns

`void`

***

### reset()

> **reset**(): `void`

Defined in: [packages/angular/material/table-system/src/lib/table-data-source.directive.ts:243](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/material/table-system/src/lib/table-data-source.directive.ts#L243)

#### Returns

`void`

***

### retry()

> **retry**(): `void`

Defined in: [packages/angular/material/table-system/src/lib/table-data-source.directive.ts:239](https://gitlab.com/rxap/packages/-/blob/8058138ff98d9e37b711846892c79ebc45ed17d4/packages/angular/material/table-system/src/lib/table-data-source.directive.ts#L239)

#### Returns

`void`
