Commit 10b9e9c98e462aea29b2c56fac24d8789363a81a

Authored by nickAS21
1 parent fa793317

LwM2M: Back - add command "/3/0/5" - trigger client

@@ -194,19 +194,19 @@ export class JsonObjectEditComponent implements OnInit, ControlValueAccessor, Va @@ -194,19 +194,19 @@ export class JsonObjectEditComponent implements OnInit, ControlValueAccessor, Va
194 } 194 }
195 195
196 beautifyJSON() { 196 beautifyJSON() {
197 - const res = JSON.stringify(this.modelValue, null, 2);  
198 if (this.jsonEditor) { 197 if (this.jsonEditor) {
  198 + const res = JSON.stringify(this.modelValue, null, 2);
199 this.jsonEditor.setValue(res ? res : '', -1); 199 this.jsonEditor.setValue(res ? res : '', -1);
  200 + this.updateView();
200 } 201 }
201 - this.updateView();  
202 } 202 }
203 203
204 minifyJSON() { 204 minifyJSON() {
205 - const res = JSON.stringify(this.modelValue);  
206 if (this.jsonEditor) { 205 if (this.jsonEditor) {
  206 + const res = JSON.stringify(this.modelValue);
207 this.jsonEditor.setValue(res ? res : '', -1); 207 this.jsonEditor.setValue(res ? res : '', -1);
  208 + this.updateView();
208 } 209 }
209 - this.updateView();  
210 } 210 }
211 211
212 writeValue(value: any): void { 212 writeValue(value: any): void {
@@ -254,6 +254,7 @@ export class JsonObjectEditComponent implements OnInit, ControlValueAccessor, Va @@ -254,6 +254,7 @@ export class JsonObjectEditComponent implements OnInit, ControlValueAccessor, Va
254 this.objectValid = !this.required; 254 this.objectValid = !this.required;
255 this.validationError = this.required ? 'Json object is required.' : ''; 255 this.validationError = this.required ? 'Json object is required.' : '';
256 } 256 }
  257 + this.modelValue = data;
257 this.propagateChange(data); 258 this.propagateChange(data);
258 } 259 }
259 } 260 }