Skip to content

Commit d30c29d

Browse files
authored
Merge branch 'master' into tzhelev/samples-routing
2 parents abd97b5 + 468db5c commit d30c29d

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

Diff for: live-editing/configs/ComboConfigGenerator.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { HttpClientModule } from "@angular/common/http";
22
import { IgxComboModule, IgxDropDownModule, IgxIconModule,
3-
IgxInputGroupModule, IgxSwitchModule } from "igniteui-angular";
3+
IgxInputGroupModule, IgxSwitchModule, IgxToastModule } from "igniteui-angular";
44
import { ComboFeatures } from "../../src/app/combo/combo-features/combo-features.component";
55
import { RemoteService } from "../../src/app/grid/services/remote.service";
66
import { CascadingCombos } from "./../../src/app/combo/cascading-combos/cascading-combos.component";
@@ -16,10 +16,10 @@ export class ComboConfigGenerator implements IConfigGenerator {
1616
additionalFiles: ["/src/app/combo/combo-features/local-data.ts",
1717
"/src/app/grid/services/remote.service.ts"],
1818
appModuleConfig: new AppModuleConfig({
19-
imports: [IgxComboModule, IgxSwitchModule, ComboFeatures,
19+
imports: [IgxComboModule, IgxSwitchModule, IgxToastModule, ComboFeatures,
2020
HttpClientModule, RemoteService],
2121
ngDeclarations: [ComboFeatures],
22-
ngImports: [IgxComboModule, IgxSwitchModule, HttpClientModule],
22+
ngImports: [IgxComboModule, IgxSwitchModule, IgxToastModule, HttpClientModule],
2323
ngProviders: [RemoteService]
2424
}),
2525
component: ComboFeatures

Diff for: src/app/combo/combo-features/combo-features.component.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,5 @@ <h3>Remote Binding</h3>
6363
</igx-combo>
6464
</div>
6565
</div>
66-
66+
<igx-toast #loadingToast></igx-toast>
6767
</div>

Diff for: src/app/combo/combo-features/combo-features.component.ts

+9-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { ChangeDetectorRef, Component, ViewChild } from "@angular/core";
2-
import { IgxComboComponent } from "igniteui-angular";
2+
import { IgxComboComponent, IgxToastComponent, IgxToastPosition } from "igniteui-angular";
33
import { RemoteService } from "../../grid/services/remote.service";
44
import { localData } from "./local-data";
55

@@ -12,7 +12,7 @@ import { localData } from "./local-data";
1212
export class ComboFeatures {
1313

1414
public prevRequest: any;
15-
15+
@ViewChild("loadingToast", { read: IgxToastComponent }) public loadingToast: IgxToastComponent;
1616
@ViewChild("combo1", { read: IgxComboComponent }) public combo1: IgxComboComponent;
1717
public lData: any[];
1818
public rData: any;
@@ -49,10 +49,15 @@ export class ComboFeatures {
4949
if (this.prevRequest) {
5050
this.prevRequest.unsubscribe();
5151
}
52-
52+
this.loadingToast.message = "Loading Remote Data...";
53+
this.loadingToast.position = IgxToastPosition.Middle;
54+
this.loadingToast.autoHide = false;
55+
this.loadingToast.show();
56+
this.cdr.detectChanges();
5357
this.prevRequest = this.remoteService.getData(this.combo2.virtualizationState, this.combo2.searchValue, () => {
54-
this.cdr.detectChanges();
5558
this.combo2.triggerCheck();
59+
this.loadingToast.hide();
60+
this.cdr.detectChanges();
5661
});
5762
}
5863

0 commit comments

Comments
 (0)