vueform / multiselect

Vue 3 multiselect component with single select, multiselect and tagging options (+Tailwind CSS support).
https://vueform.com
MIT License
808 stars 151 forks source link

Click event for clear action should not bubble up #285

Closed JZubero closed 2 years ago

JZubero commented 2 years ago

When clicking the clear icon, the dropdown shows shortly before the selection is cleared and dropdown closes again.

This could be avoided with the .stop modifier:

    <!-- Clear -->
    <slot v-if="hasSelected && !disabled && canClear && !busy" name="clear" :clear="clear">
      <span
        tabindex="0"
        role="button"
        aria-label="❎"
        :class="classList.clear"
        @click.stop="clear"
        @keyup.enter="clear"
      ><span :class="classList.clearIcon"></span></span>
    </slot>
adamberecz commented 2 years ago

Thanks, fixed in 2.5.7.

JZubero commented 2 years ago

@adamberecz Confirmed :heavy_check_mark: Thanks for this.