How can I trigger an event if no results are found when I type some text to search for an item? Thanks!
<multiselect
v-model="value"
:options="getSkillList"
placeholder="Rechercher une compétence"
:searchable="true"
noResultsText="Aucun résultat"
@select="addSkill"
ref="multiselect"
@search-change="updates"
class="multiselect-pink"
></multiselect>
<!-- Button trigger modal -->
<button
type="button"
data-bs-toggle="modal"
data-bs-target="#newSkillModal"
class="btn btn-outline-primary w-100 ms-3"
>
<font-awesome-icon icon="plus-circle" class="me-2"></font-awesome-icon>
Ajouter une nouvelle compétence
</button>
I want to enable/disable the button if the user can't find what he is looking for in the search input.
eg 1: user types 'Jav' , autocompletion proposes 'Java', user is happy and select 'Java' because data is available in DB.
eg 2: user types 'JavaFX', autocompletion proposes 'No results', user is not happy, but the button becomes enabled so he can add 'JavaFX' to the DB.