diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/property-editor/uis/date-picker/property-editor-ui-date-picker.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/property-editor/uis/date-picker/property-editor-ui-date-picker.element.ts index af73be2070..ebbbe7daa9 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/property-editor/uis/date-picker/property-editor-ui-date-picker.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/property-editor/uis/date-picker/property-editor-ui-date-picker.element.ts @@ -26,7 +26,6 @@ export class UmbPropertyEditorUIDatePickerElement extends UmbLitElement implemen this._valueString = undefined; } } - get value() { return this._valueString; } diff --git a/src/Umbraco.Web.UI.Client/src/packages/static-file/components/input-static-file/input-static-file.element.ts b/src/Umbraco.Web.UI.Client/src/packages/static-file/components/input-static-file/input-static-file.element.ts index c0711b35a7..7b1beeefb9 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/static-file/components/input-static-file/input-static-file.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/static-file/components/input-static-file/input-static-file.element.ts @@ -14,12 +14,12 @@ export class UmbInputStaticFileElement extends FormControlMixin(UmbLitElement) { * @default 0 */ @property({ type: Number }) - public get min(): number { - return this.#pickerContext.min; - } public set min(value: number) { this.#pickerContext.min = value; } + public get min(): number { + return this.#pickerContext.min; + } /** * Min validation message. @@ -37,12 +37,12 @@ export class UmbInputStaticFileElement extends FormControlMixin(UmbLitElement) { * @default Infinity */ @property({ type: Number }) - public get max(): number { - return this.#pickerContext.max; - } public set max(value: number) { this.#pickerContext.max = value; } + public get max(): number { + return this.#pickerContext.max; + } /** * Max validation message. @@ -53,12 +53,12 @@ export class UmbInputStaticFileElement extends FormControlMixin(UmbLitElement) { @property({ type: String, attribute: 'min-message' }) maxMessage = 'This field exceeds the allowed amount of files'; - public get selection(): Array { - return this.#pickerContext.getSelection(); - } public set selection(paths: Array) { this.#pickerContext.setSelection(paths); } + public get selection(): Array { + return this.#pickerContext.getSelection(); + } @property() // get value is handled by super class. @@ -66,6 +66,9 @@ export class UmbInputStaticFileElement extends FormControlMixin(UmbLitElement) { // Its with full purpose we don't call super.value, as thats being handled by the observation of the context selection. this.selection = splitStringToArray(pathsString); } + public get value(): string { + return this.selection.join(','); + } @state() private _items?: Array; diff --git a/src/Umbraco.Web.UI.Client/src/packages/static-file/components/input-static-file/input-static-file.test.ts b/src/Umbraco.Web.UI.Client/src/packages/static-file/components/input-static-file/input-static-file.test.ts index 4188f0e18d..6c1b0e0d51 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/static-file/components/input-static-file/input-static-file.test.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/static-file/components/input-static-file/input-static-file.test.ts @@ -20,8 +20,8 @@ describe('UmbInputStaticFileElement', () => { describe('Public API', () => { describe('properties', () => { - it('has a selectedPaths property', () => { - expect(element).to.have.property('selectedPaths').to.be.an.instanceOf(Array); + it('has a selection property', () => { + expect(element).to.have.property('selection').to.be.an.instanceOf(Array); }); it('has a value property', () => {