Skip to content

Commit ed924bf

Browse files
committed
fix(table): change required for RxJS 6.0
1 parent c490ac1 commit ed924bf

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/lib/table/table-data-source.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88

99
import {DataSource} from '@angular/cdk/table';
1010
import {BehaviorSubject} from 'rxjs/BehaviorSubject';
11-
import {MatPaginator} from '@angular/material/paginator';
12-
import {MatSort} from '@angular/material/sort';
11+
import {MatPaginator, PageEvent} from '@angular/material/paginator';
12+
import {MatSort, Sort} from '@angular/material/sort';
13+
import {Observable} from 'rxjs/Observable';
1314
import {Subscription} from 'rxjs/Subscription';
1415
import {combineLatest} from 'rxjs/operators/combineLatest';
1516
import {map} from 'rxjs/operators/map';
@@ -178,8 +179,8 @@ export class MatTableDataSource<T> extends DataSource<T> {
178179
_updateChangeSubscription() {
179180
// Sorting and/or pagination should be watched if MatSort and/or MatPaginator are provided.
180181
// Otherwise, use an empty observable stream to take their place.
181-
const sortChange = this._sort ? this._sort.sortChange : empty();
182-
const pageChange = this._paginator ? this._paginator.page : empty();
182+
const sortChange: Observable<Sort> = this._sort ? this._sort.sortChange : empty();
183+
const pageChange: Observable<PageEvent> = this._paginator ? this._paginator.page : empty();
183184

184185
if (this._renderChangesSubscription) {
185186
this._renderChangesSubscription.unsubscribe();

0 commit comments

Comments
 (0)