Skip to content

Commit 73107b8

Browse files
authored
Merge pull request #1760 from umbraco/bugfix/data-types-with-predefined-config
fix: ensure any property editor UIs save their initial value on the context
2 parents b193288 + 029f8b2 commit 73107b8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/packages/core/property/property/property.element.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,10 @@ export class UmbPropertyElement extends UmbLitElement {
235235
this.#valueObserver = this.observe(
236236
this.#propertyContext.value,
237237
(value) => {
238+
// Set the value on the element:
238239
this._element!.value = value;
240+
// Set the value on the context as well, to ensure that any default values are stored right away:
241+
this.#propertyContext.setValue(value);
239242
if (this.#validationMessageBinder) {
240243
this.#validationMessageBinder.value = value;
241244
}

0 commit comments

Comments
 (0)