Make Autocomplete dismount along with TagInput on blur

This commit is contained in:
Henrik Giesel 2021-06-28 02:08:30 +02:00
parent b4e84e8043
commit ba64f50593

View file

@ -219,6 +219,8 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
<ButtonToolbar class="dropup d-flex flex-wrap align-items-center" {size}>
<AddTagBadge on:click={appendEmptyTag} />
{#each tags as tag, index (tag.id)}
{#if index === active}
<TagAutocomplete
class="d-flex flex-column-reverse"
{suggestions}
@ -227,8 +229,6 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
let:updateAutocomplete
let:destroyAutocomplete
>
{#each tags as tag, index (tag.id)}
{#if index === active}
<TagInput
id={tag.id}
bind:name={activeName}
@ -252,6 +252,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
tag.name = activeName;
}}
/>
</TagAutocomplete>
{:else}
<Tag
name={tag.name}
@ -266,7 +267,6 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
class="tag-spacer flex-grow-1 align-self-stretch"
on:click={appendEmptyTag}
/>
</TagAutocomplete>
<div>
a, aab, an, ac: {active}