Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Radio components do not work outside of radio group component #1981

Closed
Blackbaud-SteveBrush opened this issue Sep 12, 2018 · 0 comments
Closed

Comments

@Blackbaud-SteveBrush
Copy link
Member

Expected behavior

Radio components should work when not wrapped in a <sky-radio-group> component. (This was how they were created to begin with.)

Actual behavior

Radio components only work when operating inside a radio group component.

screen shot 2018-09-12 at 9 24 26 am

Steps to reproduce

radio-demo.component.html

<ul class="sky-list-unstyled">
  <li>
    <sky-radio
      name="radiotest"
      value="1"
      [(ngModel)]="selectedValue"
      #cb="ngModel"
    >
      <sky-radio-label>
        Option 1
      </sky-radio-label>
    </sky-radio>
  </li>
  <li>
    <sky-radio
      disabled="true"
      name="radiotest"
      [ngModel]="selectedValue"
      [value]="valueGuy"
      (ngModelChange)="selectedValue = $event"
    >
      <sky-radio-label>
        Option 2
      </sky-radio-label>
    </sky-radio>
  </li>
  <li>
    <sky-radio
      name="radiotest"
      value="3"
      [ngModel]="selectedValue"
      (ngModelChange)="selectedValue = $event"
    >
      <sky-radio-label>
        Option 3
      </sky-radio-label>
    </sky-radio>
  </li>
</ul>

radio-demo.component.ts

import { Component } from '@angular/core';

@Component({
  selector: 'sky-radio-demo',
  templateUrl: './radio-demo.component.html'
})
export class SkyRadioDemoComponent {
  public selectedValue = '3';
  public iconSelectedValue = 'info';
  public iconGroupSelectedValue = 'table';
  public valueGuy = '2';
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants