revert to key for checkbox list
This commit is contained in:
@@ -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>`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user