-
Notifications
You must be signed in to change notification settings - Fork 238
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
feat(module: checkbox&radio): ngModel&Onpush support #167
Conversation
Codecov Report
@@ Coverage Diff @@
## master #167 +/- ##
==========================================
+ Coverage 86.34% 86.38% +0.04%
==========================================
Files 221 221
Lines 7081 7103 +22
Branches 990 986 -4
==========================================
+ Hits 6114 6136 +22
- Misses 570 571 +1
+ Partials 397 396 -1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please follow one login one pr,split it and push more pr :)
checked: boolean = false; | ||
private _disabled: boolean = false; | ||
|
||
private _ngModelOnChange = Function.prototype; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggest write:
private _ngModelOnChange: (checked: Boolean) => void = () => {};
private _disabled: boolean = false; | ||
|
||
private _ngModelOnChange = Function.prototype; | ||
private _ngModelOnTouched = Function.prototype; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggest write:
private _ngModelOnTouched: (checked: Boolean) => void = () => {};
checked: boolean = false; | ||
private _disabled: boolean = false; | ||
private _ngModelOnChange = Function.prototype; | ||
private _ngModelOnTouched = Function.prototype; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the same with up
@@ -3,15 +3,15 @@ import { | |||
ViewEncapsulation, | |||
Input, | |||
Output, | |||
EventEmitter, | |||
EventEmitter, OnChanges, SimpleChanges | |||
} from '@angular/core'; | |||
|
|||
@Component({ | |||
selector: 'SubMenu, nzm-sub-menu', | |||
templateUrl: './sub-menu.component.html', | |||
encapsulation: ViewEncapsulation.None, | |||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need onPush?
|
||
onChange: (value: RadioStatus) => {}; | ||
onTouched: () => {}; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggest unify style
@@ -0,0 +1 @@ | |||
<ng-content></ng-content> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add new line
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Checkbox & Radio Module support ngModel, so some of APIs will be modified. Please check docs for details.
Other information