fix(multi-select): render checkboxes for form data (#1835)

* chore: downgrade docs to svelte 3 for compatibility
* chore(multi-select): keep checkboxes rendered in DOM
* Display ListBox via CSS

See #1742
This commit is contained in:
Enrico Sacchetti 2023-10-26 21:21:37 -04:00 committed by GitHub
commit 7ba52df3a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 87 additions and 195 deletions

View file

@ -22,8 +22,8 @@
export let itemToString = (item) => item.text || item.id;
/**
* Override the item name, title, labelText passed to the checkbox input
* @type {(item: MultiSelectItem) => { name?: string; labelText?: any; title?: string; }}
* Override the item name, title, labelText, or value passed to the user-selectable checkbox input as well as the hidden inputs.
* @type {(item: MultiSelectItem) => { name?: string; labelText?: any; title?: string; value?: string }}
*/
export let itemToInput = (item) => {};
@ -483,7 +483,7 @@
<ListBoxMenuIcon open="{open}" translateWithId="{translateWithId}" />
{/if}
</ListBoxField>
{#if open}
<div style:display="{open ? "block" : "none"}">
<ListBoxMenu
aria-label="{ariaLabel}"
id="{id}"
@ -533,7 +533,7 @@
</ListBoxMenuItem>
{/each}
</ListBoxMenu>
{/if}
</div>
</ListBox>
{#if !inline && !invalid && !warn && helperText}
<div