Skip to content

Commit

Permalink
fix(module:radio): fix radio ContentChildren error (#2660)
Browse files Browse the repository at this point in the history
close #2206 close #2611
  • Loading branch information
vthinkxie authored Dec 19, 2018
1 parent d0b9a2a commit 36b2099
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion components/radio/nz-radio-group.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class NzRadioGroupComponent implements AfterContentInit, ControlValueAcce
private touchedSubscription: Subscription;
onChange: (_: string) => void = () => null;
onTouched: () => void = () => null;
@ContentChildren(forwardRef(() => NzRadioComponent)) radios: QueryList<NzRadioComponent>;
@ContentChildren(forwardRef(() => NzRadioComponent), { descendants: true }) radios: QueryList<NzRadioComponent>;
@Input() @InputBoolean() nzDisabled: boolean;
@Input() nzButtonStyle: NzRadioButtonStyle = 'outline';
@Input() nzSize: NzSizeLDSType = 'default';
Expand Down
10 changes: 6 additions & 4 deletions components/radio/nz-radio.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -320,10 +320,12 @@ export class NzTestRadioButtonComponent {
selector: 'nz-test-radio-group',
template: `
<nz-radio-group [(ngModel)]="value" [nzName]="name" [nzDisabled]="disabled" (ngModelChange)="modelChange($event)" [nzSize]="size">
<label nz-radio-button nzValue="A">A</label>
<label nz-radio-button nzValue="B">B</label>
<label nz-radio-button nzValue="C">C</label>
<label nz-radio-button nzValue="D">D</label>
<ng-container [ngClass]>
<label nz-radio-button nzValue="A">A</label>
<label nz-radio-button nzValue="B">B</label>
<label nz-radio-button nzValue="C">C</label>
<label nz-radio-button nzValue="D">D</label>
</ng-container>
</nz-radio-group>`
})

Expand Down

0 comments on commit 36b2099

Please sign in to comment.