Encountering a problem with b-form-checkbox
and b-form-checkbox-group
. Using @click.native
, the method is triggered twice. Oddly, directly displaying selected values in the DOM {{selected}}
reveals the correct elements in the array. However, when I console.log
my selected array in the method called by @click.native
, it appears empty upon checkbox click. Strangely, clicking the checkbox again (to uncheck) then shows the element in the selected array.
{{selected}}
<b-form-checkbox-group
stacked
:options="options"
v-model="selected"
@click.native ="filterTable"
></b-form-checkbox-group>
The filterTable function simply logs to console.
filterTable(){
console.log(this.selected);
}
Switching to @mouseup.native triggers filterTable only once but the behavior of the selected array remains inconsistent. The DOM displays it correctly, yet the method shows an inverted selected array.
A fiddle demo is available. https://jsfiddle.net/y998pLya/5/
Your assistance is appreciated.