Skip to content

Commit

Permalink
fix(showcase): fix subscription issue in dropdown demo page
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperITMan committed Apr 2, 2019
1 parent a6007bd commit 95bbf75
Showing 1 changed file with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
import { Component, OnDestroy, OnInit, ViewEncapsulation } from "@angular/core";
import { Component, OnInit, ViewEncapsulation } from "@angular/core";
import { ReferenceLink } from "../../../shared/components";
import { FormControl, Validators } from "@angular/forms";
import { Subscription } from "rxjs";

@Component({
selector: "demo-dropdown",
styleUrls: ["./demo-dropdown-page.component.scss"],
templateUrl: "./demo-dropdown-page.component.html",
encapsulation: ViewEncapsulation.None // used here to be able to customize the example-viewer background color
})
export class DemoDropdownPageComponent implements OnInit, OnDestroy {
export class DemoDropdownPageComponent implements OnInit {
public selectedService: string;
public serviceFormControl: FormControl;
public serviceFormControlSubscription: Subscription;
public selectedServiceWhiteDropdown: string;
public selectedServices: string[];
public selectedNumber: string;
Expand Down Expand Up @@ -41,10 +39,6 @@ export class DemoDropdownPageComponent implements OnInit, OnDestroy {
this.serviceFormControl = new FormControl("", Validators.required);
}

public ngOnDestroy(): void {
this.serviceFormControlSubscription.unsubscribe();
}

public numberDropdownOnChange(selectedValue: string): void {
this.selectedNumber = selectedValue;
}
Expand Down

0 comments on commit 95bbf75

Please sign in to comment.