I've been on a mission to uncover the secret behind detecting the event triggered by clicking the x
icon in a b-form-input of the type 'search':
https://i.sstatic.net/YSxjD.png
template:
<b-form-input
id="filter-input"
type="search"
v-model="filter"
@keydown.enter="onFilterChange(filter)"
@emptied.native="resetFilter(emptiedEvent)"
/>
script:
public resetFilter(event: any) {
console.log("todo: resetFilter");
}
I experimented with various event handlers like @emptied
, @reset
, @close
, @cancel
, @drop
... but none seem to be triggered.
What could I be overlooking? Could it be that Bootstrap Vue doesn't support it? The documentation didn't offer any solutions.
Do I have no choice but to rely on the standard @change
event (and check if the input is empty)?