Skip to content

Commit

Permalink
fix(module:radio): fix radio button click bug (#867)
Browse files Browse the repository at this point in the history
close #854
close #857 
close #855
  • Loading branch information
vthinkxie committed Jan 6, 2018
1 parent f0bad26 commit 2de24ee
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions src/components/radio/nz-radio-button.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,31 +24,31 @@ import { NzRadioComponent } from './nz-radio.component';
]
})
export class NzRadioButtonComponent extends NzRadioComponent implements OnInit {
private _radioButtonDisabled = false;
private _radioButtonChecked = false;
_checked = false;
_disabled = false;
_prefixCls = 'ant-radio-button';
_innerPrefixCls = `${this._prefixCls}-inner`;
_inputPrefixCls = `${this._prefixCls}-input`;

@Input()
@HostBinding('class.ant-radio-button-wrapper-disabled')
set nzDisabled(value: boolean) {
this._radioButtonDisabled = toBoolean(value);
this._disabled = toBoolean(value);
this.setClassMap();
}

get nzDisabled(): boolean {
return this._radioButtonDisabled;
return this._disabled;
}

@Input()
@HostBinding('class.ant-radio-button-wrapper-checked')
set nzChecked(value: boolean) {
this._radioButtonChecked = toBoolean(value);
this._checked = toBoolean(value);
this.setClassMap();
}

get nzChecked(): boolean {
return this._radioButtonChecked;
return this._checked;
}
}
4 changes: 2 additions & 2 deletions src/components/radio/nz-radio.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ import { NzRadioGroupComponent } from './nz-radio-group.component';
]
})
export class NzRadioComponent implements OnInit, ControlValueAccessor {
private _checked = false;
private _disabled = false;
private _focused = false;
_checked = false;
_disabled = false;
_el: HTMLElement;
_classMap;
_value: string;
Expand Down

0 comments on commit 2de24ee

Please sign in to comment.