Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
feat(table): Expose currently rendered data from the datasource.
Browse files Browse the repository at this point in the history
In order to give programmatic access to the data that is currently being rendered in the table, we should expose the renderedData BehaviourSubject.

Fixes #497
  • Loading branch information
tomheller authored and ffriedl89 committed Jan 31, 2020
1 parent 30214f7 commit b55fa62
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions components/table/src/table-data-source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ export class DtTableDataSource<T> extends DataSource<T> {
private _renderChangesSubscription = Subscription.EMPTY;
private _searchChangeSubscription = Subscription.EMPTY;

/** Public stream emitting render data to the table */
renderData = this._renderData.asObservable();

/** Array of data that should be rendered by the table, where each object represents one row. */
get data(): T[] {
return this._data.value;
Expand Down

0 comments on commit b55fa62

Please sign in to comment.