update label
This commit is contained in:
committed by
Jacob Overgaard
parent
c979db1846
commit
82b170475d
@@ -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<Option> = [
|
||||
{ name: 'String', value: 'STRING' },
|
||||
|
||||
Reference in New Issue
Block a user