From e641bcace5aecb26266ee34c098c18efc9812d5c Mon Sep 17 00:00:00 2001 From: perjerz3434 Date: Tue, 1 Jan 2019 20:36:04 +0700 Subject: [PATCH 1/3] fix issues Attempt to use a destroyed view: detectChanges in renderValue --- src/components/select/select.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/select/select.ts b/src/components/select/select.ts index 6a949f49..e9c90762 100755 --- a/src/components/select/select.ts +++ b/src/components/select/select.ts @@ -269,7 +269,9 @@ export class MdlSelectComponent extends SearchableComponent implements ControlVa } else { this.text = this.textByValue[this.stringifyValue(value)]||''; } - this.changeDetectionRef.detectChanges(); + if (!this.changeDetectionRef['destroyed']) { + this.changeDetectionRef.detectChanges(); + } if (this.optionComponents) { const _value = (!this.multiple && this.optionComponents.length === 1) From 8f717e6e48e6480a36689a04692165e7f3d235c7 Mon Sep 17 00:00:00 2001 From: perjerz3434 Date: Tue, 1 Jan 2019 20:43:27 +0700 Subject: [PATCH 2/3] fix type --- src/components/select/select.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/select/select.ts b/src/components/select/select.ts index e9c90762..db366636 100755 --- a/src/components/select/select.ts +++ b/src/components/select/select.ts @@ -269,7 +269,7 @@ export class MdlSelectComponent extends SearchableComponent implements ControlVa } else { this.text = this.textByValue[this.stringifyValue(value)]||''; } - if (!this.changeDetectionRef['destroyed']) { + if (!(this.changeDetectionRef['destroyed'])) { this.changeDetectionRef.detectChanges(); } From eae7580149f746b3de86855cdae4fbf8ff603249 Mon Sep 17 00:00:00 2001 From: perjerz3434 Date: Tue, 1 Jan 2019 20:52:58 +0700 Subject: [PATCH 3/3] fix type any --- src/components/select/select.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/select/select.ts b/src/components/select/select.ts index db366636..05802fb5 100755 --- a/src/components/select/select.ts +++ b/src/components/select/select.ts @@ -269,7 +269,7 @@ export class MdlSelectComponent extends SearchableComponent implements ControlVa } else { this.text = this.textByValue[this.stringifyValue(value)]||''; } - if (!(this.changeDetectionRef['destroyed'])) { + if (!(this.changeDetectionRef)['destroyed']) { this.changeDetectionRef.detectChanges(); }