Strange behavior observed with @click.native on <b-form-checkbox> in Bootstrap-Vue

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.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What is causing my Directive to trigger the error "Error: $injector:unpr Unknown Provider"?

I have been diligently working on updating my Controllers, Factories, and Directives to align with the recommended Angular Style Guide for Angular Snippets. So far, I have successfully refactored the Controllers and Factories to comply with the new style ...

Working with time durations in JavaScript

Is there a way to calculate the duration between a start time and an end time including both hours and minutes? Currently, I have code that only provides me with the hours. Is there any modification I can make to include minutes as well? If so, what chan ...

Looking to incorporate content from an external website onto my own site

I have experimented with various types of HTML tags such as iframe, embed, and object to display external websites. Some of them load successfully, while others do not. After researching my issue on Google, I discovered that "For security reasons, some si ...

Obtain the content enclosed by HTML tags

Looking to extract text between html tags? Imagine having a list of cities in California, each within paragraph tags. Can you retrieve only the text inside the paragraph tags? <div class="cities"> <div><p>Los Angeles</p><h5 ...

updating the page using the latest AJAX function

I have a webpage that showcases the newest images. I am utilizing an AJAX request to organize these images : $('#trier').on('click', function() { // Clicking on the button triggers sorting action var b = document.getElementByI ...

Using JavaScript to trigger actions via links or buttons inside a table will only function properly in the first row

After multiple consecutive Ajax requests to refill an HTML table, there seems to be a strange issue. The links in the first row of the table are functioning properly and call JavaScript functions, but for any subsequent rows, the links or buttons stop work ...

The specified element "errors" is not found in the VeeValidate template

Trying to use VeeValidate for field validation in a Vue form with Vue 2.5 and VeeValidate 2.1, the following method is used: <input class="form-control" name="contact-email" id="contact-email" type="email" v-model="contact-email" v-validate="'re ...

Is there a way to make Vuetify's DataTable appear the same on both desktop and smartphone screens?

On a smartphone screen in portrait orientation, displaying a DataTable results in the original rows being separated and an imperfect appearance. However, when the smartphone is in landscape mode, the display is ideal. I am seeking assistance with one of t ...

Error occurred in AngularJS service due to incorrect data type

Looking to store the URL of a query in an AngularJS service like this: var mortgageloanService = angular.module('loanstreetIpadAppApp', []); mortgageloanService.factory('updateTable', function($http) { return { getParams: fun ...

Nuxt encountering a critical issue: "module 'dir-glob' not found"

Recently, while running my Nuxt app, I encountered an error after restarting the server using npm run dev. The error message stated that it couldn't find the module 'dir-glob'. Despite finding a similar issue on Stack Overflow related to Ang ...

I am encountering issues with Axios when bundled with electron - what steps can I take to troubleshoot a compiled exe with electron?

I recently developed a VUE JS application that consumes data from a News API endpoint. To achieve this, I utilized Axios for fetching the data as shown below: import axios from "axios"; let baseURL = `https://newsapi.org/v2`; let apiKey = process ...

Angular.js and D3 - The Perfect Combination for Dynamic Data Visualization!

Having some trouble creating a chart with angular.js. The chart is not appearing on the page when using rout.js, but it works fine without it. Here's my code: var myapp = angular.module('myapp', ['angularCharts']); function D3 ...

Using JavaScript to eliminate brackets

When a map is clicked, I have a function that retrieves GPS coordinates. However, the result is currently displayed in brackets (). It is necessary to eliminate the brackets. function onClickCallback(event){ var str = event.latLng var Gpps = str / ...

Conceal a div until reaching the end of the webpage by scrolling

Currently, I am working on a web page inspired by music release pages (check out an example here). My goal is to have certain hidden divs at the bottom of the page only reveal themselves once the user has scrolled all the way down, with a delay of a few se ...

What is the best way to synchronize these two bootstrap sliders?

Looking to synchronize two Bootstrap 4 carousels? Check out the image below: https://i.sstatic.net/rAC3j.png I'm struggling to display the content of both carousels simultaneously with their respective indicators and arrow icons. Can anyone assist m ...

BroccoliMergeTrees function encountered an unexpected data type while attempting to merge trees: TreeMerger (lint) was expecting a Broccoli node, but received an [object

Since switching to Ubuntu 18.04, I've been trying to set up my Ember development environment but have encountered an issue. While my ember project works fine on Windows, I'm getting the error "BroccoliMergeTrees (TreeMerger (lint)): Expected Broc ...

Clicking a link will trigger a page refresh and the loading of a new div

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script> $(window).load(function () { var divs = $( #add_new, #details"); $("li a").click(function () { ...

A quick and efficient method to ensure an addon functions seamlessly across all popular web browsers like Firefox, Chrome, Opera, Internet Explorer, and Safari

If you're looking to create one addon that works across all major browsers simultaneously, there are tools available like crossrider, kangoextensions, and the addon framework from besttoolbars.net. By using greasemonkey and converting it into a full ...

Leverage the power of Component Router in conjunction with the Upgrade

While attempting to integrate the Angular 2 Component Router with the upgrade adapter in Angular 2 RC 4, I encountered the following error: Bootstrap at least one component before injecting Router. at setupRouter Below is my main.ts file: angular.mo ...

Ways to trigger the jQuery click function using a designated element rather than $(this)

Within my code, I have a method set up like this; $('.kaldir').click(function () { var thisCheck = $(this); ..... } In addition, my HTML input field(s) are structured in this manner; <input type="radio" name="chbBesDi ...