diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/property-editor/uis/value-type/property-editor-ui-value-type.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/property-editor/uis/value-type/property-editor-ui-value-type.element.ts index 2fbcca9a08..77c3e247a3 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/property-editor/uis/value-type/property-editor-ui-value-type.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/property-editor/uis/value-type/property-editor-ui-value-type.element.ts @@ -1,6 +1,6 @@ -import { html, customElement, property, state } from '@umbraco-cms/backoffice/external/lit'; +import { html, customElement, property, state, query } from '@umbraco-cms/backoffice/external/lit'; import { UmbTextStyles } from '@umbraco-cms/backoffice/style'; -import type { UUISelectEvent } from '@umbraco-cms/backoffice/external/uui'; +import type { UUISelectElement, UUISelectEvent } from '@umbraco-cms/backoffice/external/uui'; import { UmbPropertyEditorUiElement } from '@umbraco-cms/backoffice/extension-registry'; import { UmbLitElement } from '@umbraco-cms/internal/lit-element'; import type { UmbPropertyEditorConfigCollection } from '@umbraco-cms/backoffice/property-editor'; @@ -20,6 +20,7 @@ export class UmbPropertyEditorUIValueTypeElement extends UmbLitElement implement this._value = value; const selected = this._options.filter((option) => { + if (this.selectEl && option.value === this.value) this.selectEl.value = this.value; return (option.selected = option.value === this.value); }); if (selected.length === 0) { @@ -27,6 +28,9 @@ export class UmbPropertyEditorUIValueTypeElement extends UmbLitElement implement } } + @query('uui-select') + selectEl?: UUISelectElement; + @state() private _options: Array