{ dispatch('changeContent') }} > {#if enableSearch}
{/if}
{@const item = objects[idx]}
{ if (multiselect && Array.isArray(selected)) { const index = selected.indexOf(item.id) if (index !== -1) { selected.splice(index, 1) selected = selected } else { selected = selected === undefined ? [item.id] : [...selected, item.id] } dispatch('update', selected) } else { dispatch('close', item.id) } }} >
{item.label}
{#if isSelected(selected, item)}
{/if}