Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect behavior when using b-radio in conjunction with v-for #206

Closed
Tirke opened this issue Jul 28, 2017 · 0 comments
Closed

Incorrect behavior when using b-radio in conjunction with v-for #206

Tirke opened this issue Jul 28, 2017 · 0 comments
Labels

Comments

@Tirke
Copy link
Contributor

Tirke commented Jul 28, 2017

Overview of the problem

Buefy & Vuejs @latest

Description

When using <b-radio> in conjunction with v-for the correct radio is not checked ...

Steps to reproduce

 <div class="block">
  <b-radio-group v-model="internal.service_id">
    <b-radio :value="service.id" :key="service.id" v-for="service in actor.services">
      {{service.name}}
    </b-radio>
  </b-radio-group>
 </div>

Knowing data is :

data () {
  return {
    internal: {
      service_id: 'Matching id to one of the radio',
    }
  }
}

Expected behavior

The radio with a value matching the v-model should be checked.

Actual behavior

The radio with a value matching the v-model is not checked.

Potential fix

Adding this.$parent.initChecked() in created() call in Radio.vue is one way to fix the problem.

@Tirke Tirke changed the title Incorrect behavior when using <b-radio> in conjunction with v-for Incorrect behavior when using b-radio in conjunction with v-for Jul 28, 2017
@rafaberaldo rafaberaldo added the bug label Aug 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants