Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 48978

Getting wrong ion-radio button value

$
0
0

I’m trying to get the value of selected radio button however I’m getting a weird “ion-rb-73” text. The number after ion-rb- is different every time.

Here is my code

  <ion-accordion-group>
        <ion-accordion
          :value="category.value"
          v-for="(category, k) in categories"
          :key="k"
          v-model="categories"
        >
          <ion-item slot="header" @click="getAccordionIndex(category)">
            <ion-icon :src="'/assets/images/' + category.icon"></ion-icon>
            <ion-label style="padding-left: 4%">{{ category.name }}</ion-label>
          </ion-item>
          <ion-list slot="content">
            <ion-radio-group v-model="subcategory">
              <ion-item
                style="padding: 0px; margin: 0px"
                v-for="(subcat, k) in category.subcats"
                :key="k"
              >
                <ion-label>{{ subcat }}</ion-label>
                <ion-radio> </ion-radio>
              </ion-item>
              <span>value is {{ subcategory }}</span>
            </ion-radio-group>
          </ion-list>
        </ion-accordion>
      </ion-accordion-group>

Any help is much appreciated!

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 48978

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>