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 - Not checking default value

See original GitHub issue

Hello,

Running Bootstrap-Vue 2.0.0-rc.10 Windows 10 Chrome 69 ( Latest )

It seems that my default selected checkbox is not appearing as checked unless I update the data property afterwards. ( ‘next-day’ )

( Using PUG with Vue )

b-form-radio-group(
  v-model="booking_methods.selected",
  :options="booking_methods.options",
  name="bookingMethods",
 )
export default {
  name: 'bookingscreate',
  data() {
    return {
      booking_methods: {
          selected: 'next-day',
          options: [
            { 
              text: 'Next Day', 
              value: 'next-day' 
            },
            { 
              text: 'Next Day ( Before Noon )', 
              value: 'next-day-before-noon' 
            },
            { 
              text: 'Next Day ( Before 10:30 AM )', 
              value: 'next-day-before-10' 
            },
            { 
              text: 'Next Day ( Before 9:00 AM )', 
              value: 'next-day-before-9' 
            },
            { 
              text: 'Next Day ( Before 7:00 AM )', 
              value: 'next-day-before-7' 
            },
            { 
              disabled: true, 
              text: 'International Delivery', 
              value: 'international' 
            },
            { 
              text: 'Sameday Delivery', 
              value: 'same-day' 
            }
          ]
      }
    }
  }
}

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

7reactions
celorodovalhocommented, Feb 16, 2019

I love BootstrapVue, but that is the worse issue that I’ve faced and the maintainers don’t give a solution for the other similar issues [#2609, #1266, #1566].

It’s a problem with Bootstrap 4? Yes, it is. But the implementation should give a solution or at least explain this stuff in documentation. The “invalid-feedback” is not in documentation also and doesn’t seem to be a good alternative.

4reactions
vladvasiliucommented, Nov 16, 2018

I actually this doesn’t have the expected behaviour, nor is it the documented one. With other kinds of inputs this works as expected, even with the dotted notation.

The example copied and pasted from the doc doesn’t work as expected. A radio group hand-built in the template works as expected.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The radio button <b-form-radio-group> is not checked (turning ...
I have a reset function to have one of radio button checked. when I call the function, the value of the radio button...
Read more >
Form Radio | Components - BootstrapVue
Do not use the checked prop directly. Each radio in a radio group must have a unique value. Radios support values of many...
Read more >
Form Radio | Components | BootstrapVue
<b-form-radio> and <b-form-radio-group> do not have a value by default. ... (to which the v-model is set to when the radio is checked)...
Read more >
Updating a bootstrap-vue b-form-radio-group with previous ...
I can not for the life of me figure this out. I have a bootstrap vue radio form group which updates a v-model...
Read more >
Form Radio Button How To (Show Default Value, Upda...
When creating a Radio button, by default it will not show the ... Change the value of the Choice field and click the...
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