revert to key for checkbox list

This commit is contained in:
Niels Lyngsø
2023-04-04 11:41:27 +02:00
parent 4b049f77ac
commit bb2e98ab84

View File

@@ -22,7 +22,7 @@ export class UmbInputCheckboxListElement extends FormControlMixin(UmbLitElement)
*/
// TODO: Could this use a type that we export to ensure TS failure, or hook this up with a type coming from backend?
@property()
public list: Array<{ id: string; checked: boolean; value: string }> = [];
public list: Array<{ key: string; checked: boolean; value: string }> = [];
#selected: Array<string> = [];
public get selected(): Array<string> {
@@ -63,7 +63,7 @@ export class UmbInputCheckboxListElement extends FormControlMixin(UmbLitElement)
if (!this.list) return nothing;
return html`<form>
<uui-form @change="${this.#setSelection}">
${repeat(this.list, (item) => item.id, this.renderCheckbox)}
${repeat(this.list, (item) => item.key, this.renderCheckbox)}
</uui-form>
</form>`;
}