diff --git a/src/data/data-source/data-source.ts b/src/data/data-source/data-source.ts index 6f518967..c1dc2d50 100644 --- a/src/data/data-source/data-source.ts +++ b/src/data/data-source/data-source.ts @@ -6,11 +6,11 @@ export const dataSourceMarker = Symbol('Data Source Marker'); /** * A model which can be used to retrieve data asynchronously */ -export interface DataSource { +export interface DataSource { /** * Retrieves data of type T in the form of an observable */ - getData(): Observable; + getData(request?: R): Observable; /** * A marker property used to determine if the implementing class is diff --git a/src/model/api/default-model-api.ts b/src/model/api/default-model-api.ts index de943b0a..e7192ba2 100644 --- a/src/model/api/default-model-api.ts +++ b/src/model/api/default-model-api.ts @@ -69,7 +69,7 @@ export class DefaultModelApi implements ModelApi { /** * @inheritdoc */ - public getData(): Observable { + public getData(request?: R): Observable { const dataSource = this.dataSourceManager.getClosest(this.model); if (!dataSource) { @@ -78,7 +78,7 @@ export class DefaultModelApi implements ModelApi { return EMPTY; } - return dataSource.getData(); + return dataSource.getData(request); } /** diff --git a/src/model/api/model-api.ts b/src/model/api/model-api.ts index 7573463f..74ea358d 100644 --- a/src/model/api/model-api.ts +++ b/src/model/api/model-api.ts @@ -32,7 +32,7 @@ export interface ModelApi { * attached to) * - Else, recurse upwards to parent */ - getData(): Observable; + getData(request?: R): Observable; /** * Retrieves the merged theme specified for this model