Utilizing vue multiselect to present a list of currencies to users, I disable any unavailable currency using the $isDisabled property. However, I am facing an issue where I am unable to display a tooltip or title when hovering over these disabled options due to the "pointer-events: none" CSS setting on them. Since I cannot manipulate the wrapper template of my custom options, what steps can I take to achieve this?
The code snippet is as follows:
<multiselect
v-model="buyCurrency"
:options="canBuyCurrencies"
:show-labels="false"
:searchable="false"
:allow-empty="false"
:clear-on-select="false"
:close-on-select="true"
class="select-buy-currency"
@select="handleBuyCurrencyChange"
>
<template slot="option" slot-scope="props">
<div title="Test title" class="d-flex flex-row justify-content-apart align-items-center">
<img
class="option__image"
:src="`/img/flags/${props.option.code}.svg`"
:alt="props.option.code"
/>
<div class="option__desc">
<span class="option__title">
{{ props.option.code }}
</span>
</div>
</div>
</template>
</multiselect>
The current implementation sets the title for all options, but it only shows up when hovering over enabled options.
In an attempt to enable pointer events through CSS, the disabled options became clickable, causing an error that disrupts the program flow. Here's the error message:
TypeError: Cannot read properties of undefined (reading 'every')
at VueComponent.wholeGroupSelected (vue-multiselect.min.js?8e5f:1:1)
at VueComponent.selectGroup (vue-multiselect.min.js?8e5f:1:1)
at mousedown (vue-multiselect.min.js?8e5f:1:1)
at invokeWithErrorHandling (vue.common.dev.js?4650:1868:1)
at HTMLSpanElement.invoker (vue.common.dev.js?4650:2193:1)
at original._wrapper (vue.common.dev.js?4650:7587:1)
How can I override the default click behavior in this scenario?