Commit 096b2944d08e7c69f9e835ad9bfad61c1328f260
1 parent
359723b0
Improve kv-map component disable state handling
Showing
1 changed file
with
5 additions
and
0 deletions
... | ... | @@ -117,6 +117,11 @@ export class KeyValMapComponent extends PageComponent implements ControlValueAcc |
117 | 117 | this.valueChangeSubscription = this.kvListFormGroup.valueChanges.subscribe(() => { |
118 | 118 | this.updateModel(); |
119 | 119 | }); |
120 | + if (this.disabled) { | |
121 | + this.kvListFormGroup.disable({emitEvent: false}); | |
122 | + } else { | |
123 | + this.kvListFormGroup.enable({emitEvent: false}); | |
124 | + } | |
120 | 125 | } |
121 | 126 | |
122 | 127 | public removeKeyVal(index: number) { | ... | ... |