riophae / vue-treeselect

A multi-select component with nested options support for Vue.js
https://vue-treeselect.js.org/
MIT License
2.91k stars 509 forks source link

"clear-on-select" doesn't work with "async=true" #435

Open GTCrais opened 3 years ago

GTCrais commented 3 years ago
<treeselect
    :multiple="multiple"
    :options="values"
    :show-count="true"
    :placeholder="placeholder"
    :disabled="disabled"
    :normalizer="normalizer"
    :async="true"
    :load-options="search"
    :clear-on-select="true"
    :disable-fuzzy-matching="true"
    v-model="propertyValue"
    @input="onInput"
>
</treeselect>
search: debounce(function({ action, searchQuery, callback }) {
  if (action === ASYNC_SEARCH) {
      this.loadAsync(searchQuery).then((data) => {
          callback(null, data);
      });
  }
}, 600)

With these options, clear-on-select is ignored.