Skip to content

Commit 029f8b2

Browse files
committed
fix: ensure any property editor UIs save their initial value on the context
this ensures that if, say, a textarea is saved with "rows=10" without touching the input box at all
1 parent 73028e3 commit 029f8b2

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
@@ -234,7 +234,10 @@ export class UmbPropertyElement extends UmbLitElement {
234234
this.#valueObserver = this.observe(
235235
this.#propertyContext.value,
236236
(value) => {
237+
// Set the value on the element:
237238
this._element!.value = value;
239+
// Set the value on the context as well, to ensure that any default values are stored right away:
240+
this.#propertyContext.setValue(value);
238241
if (this.#validationMessageBinder) {
239242
this.#validationMessageBinder.value = value;
240243
}

0 commit comments

Comments
 (0)