Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(module:checkbox): fix invalid setting width via style #1577

Merged
merged 1 commit into from
Jun 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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