Skip to content

Commit

Permalink
Merge branch 'master' into tzhelev/samples-routing
Browse files Browse the repository at this point in the history
  • Loading branch information
tachojelev authored Jul 30, 2018
2 parents abd97b5 + 468db5c commit d30c29d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
6 changes: 3 additions & 3 deletions live-editing/configs/ComboConfigGenerator.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { HttpClientModule } from "@angular/common/http";
import { IgxComboModule, IgxDropDownModule, IgxIconModule,
IgxInputGroupModule, IgxSwitchModule } from "igniteui-angular";
IgxInputGroupModule, IgxSwitchModule, IgxToastModule } from "igniteui-angular";
import { ComboFeatures } from "../../src/app/combo/combo-features/combo-features.component";
import { RemoteService } from "../../src/app/grid/services/remote.service";
import { CascadingCombos } from "./../../src/app/combo/cascading-combos/cascading-combos.component";
Expand All @@ -16,10 +16,10 @@ export class ComboConfigGenerator implements IConfigGenerator {
additionalFiles: ["/src/app/combo/combo-features/local-data.ts",
"/src/app/grid/services/remote.service.ts"],
appModuleConfig: new AppModuleConfig({
imports: [IgxComboModule, IgxSwitchModule, ComboFeatures,
imports: [IgxComboModule, IgxSwitchModule, IgxToastModule, ComboFeatures,
HttpClientModule, RemoteService],
ngDeclarations: [ComboFeatures],
ngImports: [IgxComboModule, IgxSwitchModule, HttpClientModule],
ngImports: [IgxComboModule, IgxSwitchModule, IgxToastModule, HttpClientModule],
ngProviders: [RemoteService]
}),
component: ComboFeatures
Expand Down
2 changes: 1 addition & 1 deletion src/app/combo/combo-features/combo-features.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,5 @@ <h3>Remote Binding</h3>
</igx-combo>
</div>
</div>

<igx-toast #loadingToast></igx-toast>
</div>
13 changes: 9 additions & 4 deletions src/app/combo/combo-features/combo-features.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ChangeDetectorRef, Component, ViewChild } from "@angular/core";
import { IgxComboComponent } from "igniteui-angular";
import { IgxComboComponent, IgxToastComponent, IgxToastPosition } from "igniteui-angular";
import { RemoteService } from "../../grid/services/remote.service";
import { localData } from "./local-data";

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

public prevRequest: any;

@ViewChild("loadingToast", { read: IgxToastComponent }) public loadingToast: IgxToastComponent;
@ViewChild("combo1", { read: IgxComboComponent }) public combo1: IgxComboComponent;
public lData: any[];
public rData: any;
Expand Down Expand Up @@ -49,10 +49,15 @@ export class ComboFeatures {
if (this.prevRequest) {
this.prevRequest.unsubscribe();
}

this.loadingToast.message = "Loading Remote Data...";
this.loadingToast.position = IgxToastPosition.Middle;
this.loadingToast.autoHide = false;
this.loadingToast.show();
this.cdr.detectChanges();
this.prevRequest = this.remoteService.getData(this.combo2.virtualizationState, this.combo2.searchValue, () => {
this.cdr.detectChanges();
this.combo2.triggerCheck();
this.loadingToast.hide();
this.cdr.detectChanges();
});
}

Expand Down

0 comments on commit d30c29d

Please sign in to comment.