Skip to content

Commit

Permalink
fix(module:checkbox): fix invalid setting width via style (#1577)
Browse files Browse the repository at this point in the history
close #1359
  • Loading branch information
vthinkxie authored Jun 1, 2018
1 parent 024c488 commit ec4be6b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 1 addition & 3 deletions components/checkbox/nz-checkbox-wrapper.component.html
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
<div class="ant-checkbox-group">
<ng-content></ng-content>
</div>
<ng-content></ng-content>
5 changes: 4 additions & 1 deletion components/checkbox/nz-checkbox-wrapper.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ import { NzCheckboxComponent } from './nz-checkbox.component';
@Component({
selector : 'nz-checkbox-wrapper',
preserveWhitespaces: false,
templateUrl : './nz-checkbox-wrapper.component.html'
templateUrl : './nz-checkbox-wrapper.component.html',
host : {
'[class.ant-checkbox-group]': 'true'
}
})
export class NzCheckboxWrapperComponent {
@Output() nzOnChange = new EventEmitter<string[]>();
Expand Down
2 changes: 1 addition & 1 deletion components/checkbox/nz-checkbox.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ describe('checkbox', () => {
inputElement = checkboxWrapper.nativeElement.querySelector('input') as HTMLInputElement;
}));
it('should className correct', fakeAsync(() => {
expect(checkboxWrapper.nativeElement.firstElementChild.classList).toContain('ant-checkbox-group');
expect(checkboxWrapper.nativeElement.classList).toContain('ant-checkbox-group');
}));
it('should onChange correct', fakeAsync(() => {
inputElement.click();
Expand Down

0 comments on commit ec4be6b

Please sign in to comment.