question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

b-form-radio-group no events fired off on change

See original GitHub issue

I have been trying to get this to work since beta 7 and have opened a previous ticket. The change event seems to not be firing off when changing values on a radio group, or I am doing something wrong. Here is the code I am using:

<b-form-radio-group id="rdoCal"
            buttons
            button-variant="primary"
            v-model="selCalView"
            @change="changeCalView" 
            v-on:change="changeCalView"
            :options="options"
            class="mb-4"></b-form-radio-group>

I tried using @change and @change.native as well as the vue v-on, and nothing is firing off the event.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:14 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
tmorehousecommented, Sep 24, 2017

Have you tried v1.0.0.-beta.9?

This works for me:

<template>
  <b-form-radio-group id="radios1"
                      buttons
                      @change="log"
                      v-model="selected"
                      :options="options"
                      name="radioOptions">
  </b-form-radio-group>
</template>

<script>
  export default {
    data: {
      selected: 'first',
      options: [
        { text: 'First', value: 'first' },
        { text: 'Second', value: 'second' },
        { text: 'Third', value: 'third' },
        { text: 'Fourth', value: 'fourth' }
      ]
    },
    methods:{
      log(arg) {
        console.log(arg);
      }
    }
  };
</script>

In the console, I see the value logged as I click the radios.

2reactions
guilhermejbrancocommented, May 26, 2020

@change.native="changeCalView"

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pass arguments *and* clicked value with @change in ...
I understand from the Booststrap-vue documentation that calling the function in the @change for the radio button without parenthesis will pass ...
Read more >
Form Radio | Components - BootstrapVue
Cross browser consistent radio inputs and radio groups, using Bootstrap's custom radio input to replace the browser default radio input.
Read more >
Javascript Radio Input Type on Form not firing On Change Event
Have been converting a dynamically created form from Bootstrap 4 to Mobiscroll. Am doing the mobiscroll.form call on the new Form element ...
Read more >
Enable Disable radio buttons based on models value-Vue.js
Here's a snippet utilizing the input event. If the value gets changed to no it will change the next radio button you've defined...
Read more >
b form radio group的推薦與評價, 網紅們這樣回答
b form radio group 在单选择表单(Form Radio Inputs) - Bootstrap 的相關結果 ... b form radio group 在b-form-radio-group no events fired off on change #1107 ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found