Class: LocalDataSource<Data>
index.LocalDataSource
The local data source requires the data to be passed in as an array. The datatable is still paginated, sorted and searchable by performing everything on the clientside
Type parameters #
Name |
---|
Data |
Hierarchy #
AbstractDataSource<Data>
↳ LocalDataSource
Constructors #
constructor #
• new LocalDataSource<Data>(data, options?)
Create a new local data source to use the passed in array as data.
Type parameters #
Name |
---|
Data |
Parameters #
Name | Type | Description |
---|---|---|
data | Data[] | array with all table entries |
options | LocalDataSourceOptions<Data> |
Overrides #
AbstractDataSource.constructor
Defined in #
dataSource/LocalDataSource.ts:23
Methods #
getQueryObserver #
▸ getQueryObserver(): Readable<QueryObserver<Data>>
Returns #
Readable<QueryObserver<Data>>
Inherited from #
AbstractDataSource.getQueryObserver
Defined in #
dataSource/AbstractDataSource.ts:26
init #
▸ init(config): void
Parameters #
Name | Type |
---|---|
config | Required<DataTableConfig<Data>> |
Returns #
void
Inherited from #
Defined in #
dataSource/AbstractDataSource.ts:22
requestData #
▸ requestData(data): void
Called to retrieve the initial datatable entries and everytime the request changes, for example when the user loads the next page, sorts the entries or searches for something
Parameters #
Name | Type | Description |
---|---|---|
data | PaginatedListRequest<Data> | the request data to be passed through to the server |
Returns #
void
Overrides #
AbstractDataSource.requestData