Skip to content

Commit 7fb1f95

Browse files
committedAug 4, 2023
fix(wcp-input-code): handle value changes
given from outside
1 parent 65891d2 commit 7fb1f95

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
 

‎src/components/forms/input-code/input-code.component.ts

+3
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,9 @@ export class InputCode extends Editable()(LitElement) implements FormAssociated<
268268
if (changedProperties.has('autosize')) {
269269
this.updateEditorAutoSize();
270270
}
271+
if (changedProperties.has('value') && this.value !== model?.getValue()) {
272+
this.#editor?.setValue(this.value ?? '');
273+
}
271274
}
272275

273276
@eventOptions({ passive: true })

0 commit comments

Comments
 (0)