fixed dataTime range bug & clean code
This commit is contained in:
@@ -15,12 +15,14 @@ export class DataGridDemoHomeComponent implements OnInit, OnDestroy {
|
||||
columns = ['id','name', 'address', 'commands']
|
||||
merchantDataSource: IDataSource<IMerchant>;
|
||||
private _dataSubscription: Subscription;
|
||||
private _loading: Subscription;
|
||||
constructor(private merchantService: MerchantService){
|
||||
this.merchantDataSource = this.createDataSource();
|
||||
|
||||
}
|
||||
ngOnDestroy(): void {
|
||||
this._dataSubscription.unsubscribe();
|
||||
this._loading.unsubscribe();
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +48,7 @@ export class DataGridDemoHomeComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.merchantDataSource.loading$.subscribe(isLoading => {
|
||||
this._loading = this.merchantDataSource.loading$.subscribe(isLoading => {
|
||||
console.log('merchant data source event loading', isLoading);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user