diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/property-editor/uis/checkbox-list/input-checkbox-list/input-checkbox-list.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/property-editor/uis/checkbox-list/input-checkbox-list/input-checkbox-list.element.ts index 752bb76eb7..9fd855e21f 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/property-editor/uis/checkbox-list/input-checkbox-list/input-checkbox-list.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/property-editor/uis/checkbox-list/input-checkbox-list/input-checkbox-list.element.ts @@ -12,9 +12,9 @@ export class UmbInputCheckboxListElement extends FormControlMixin(UmbLitElement) #selection: Array = []; @property({ type: Array }) - public set selection(keys: Array) { - this.#selection = keys; - super.value = keys.join(','); + public set selection(values: Array) { + this.#selection = values; + super.value = values.join(','); } public get selection(): Array { return this.#selection; @@ -32,16 +32,16 @@ export class UmbInputCheckboxListElement extends FormControlMixin(UmbLitElement) #onChange(e: UUIBooleanInputEvent) { e.stopPropagation(); if (e.target.checked) this.selection = [...this.selection, e.target.value]; - else this.#removeFromSelection(this.selection.findIndex((key) => e.target.value === key)); + else this.#removeFromSelection(this.selection.findIndex((value) => e.target.value === value)); this.dispatchEvent(new UmbChangeEvent()); } #removeFromSelection(index: number) { if (index == -1) return; - const keys = [...this.selection]; - keys.splice(index, 1); - this.selection = keys; + const values = [...this.selection]; + values.splice(index, 1); + this.selection = values; } render() { diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/property-editor/uis/checkbox-list/input-checkbox-list/input-checkbox-list.stories.ts b/src/Umbraco.Web.UI.Client/src/packages/core/property-editor/uis/checkbox-list/input-checkbox-list/input-checkbox-list.stories.ts index 8b3076622a..61b9442e25 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/property-editor/uis/checkbox-list/input-checkbox-list/input-checkbox-list.stories.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/property-editor/uis/checkbox-list/input-checkbox-list/input-checkbox-list.stories.ts @@ -14,13 +14,13 @@ export const Overview: Story = { args: { list: [ { - key: 'isAwesome', - value: 'Umbraco is awesome?', + label: 'Umbraco is awesome?', + value: 'isAwesome', checked: true, }, { - key: 'attendingCodeGarden', - value: 'Attending CodeGarden?', + label: 'Attending CodeGarden?', + value: 'attendingCodeGarden', checked: false, }, ],