-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
关于应用 NZ 响应表单的BUG #134
Comments
@myepoch It seems that you are using original angular input form, it has noting todo with ng-zorro. |
Hi. For example: export class NzInputComponent implements AfterContentInit, ControlValueAccessor {
// ...
// This function is called when the control status changes to or from "DISABLED".
setDisabledState(isDisabled: boolean): void {
this.nzDisabled = isDisabled;
}
} I search the components file. I found that many components are missing this hook. |
If confirmed as a bug. My pleasure to help to fix other components that implement |
@deart1mer Yes, nz-input and all other components such as nz-datepicker have not implement the setDisabledState yet, but this is not associate with this issue since @myepoch used input other than nz-input. It is great that if you want to help us to patch all components with setDisabledState, thanks. |
* fix(module:input): fix disable bug in reactive form (#134) * fix(module:switch): fix disable bug in reactive form * fix(module:slider): fix disable bug in reactive form * fix(module:select): fix disable bug in reactive form * fix(module:input-number): fix disable bug in reactive form * fix(module:timepicker): fix disable bug in reactive form * fix(module:datepicker): fix disable bug in reactive form * fix(module:rate): fix disable bug in reactive form * fix(module:radio): fix radio-group disable bug in reactive form * fix(module:checkbox): fix checkbox & checkbox-group disable bug in reactive form * fix(module:cascader): fix cascader disable bug in reactive form
This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread. |
当文本框失去焦点的时候,预期文本框 不可编辑(但是disable 顺序在上起作用,disable顺序在下不起作用)
`` <form nz-form [formGroup]="validateForm" (ngSubmit)="_submitForm()">
<input id="email" name="email" formControlName="email" (blur)="onIdCardChange(validateForm.controls)" class="form-control">
` ngOnInit() {
this.validateForm = this.fb.group({ // 初始化表单模型
email : [ '', [ Validators.email ] ]
});
}
public onIdCardChange (form: any): void { // 当页面文本框失去焦点时
// this.validateForm.get ('email').disable (); // 如果写在这,那么文本框 disable 起作用
}`
The text was updated successfully, but these errors were encountered: