Skip to content

Commit

Permalink
fix: fix 'null' is not assignable to type 'NzFormControlStatusType' (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
cipchk authored Jul 12, 2022
1 parent 5638156 commit aa6c77b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
"extend": "^3.0.2",
"file-saver": "^2.0.5",
"ng-github-button": "^13.0.0",
"ng-zorro-antd": "^13.1.1",
"ng-zorro-antd": "^13.3.2",
"ngx-color": "~7.3.3",
"ngx-countdown": "^13.0.0",
"ngx-highlight-js": "^13.0.0",
Expand Down
5 changes: 3 additions & 2 deletions packages/form/src/model/form.property.ts
Original file line number Diff line number Diff line change
Expand Up @@ -373,16 +373,17 @@ export abstract class FormProperty {

// #endregion

updateFeedback(status: NzFormControlStatusType = null, icon?: string | null): void {
updateFeedback(status: NzFormControlStatusType = '', icon?: string | null): void {
this.ui.feedback = status;
this.ui.feedbackIcon =
icon ||
{
'': '',
error: 'close-circle-fill',
validating: 'loading',
success: 'check-circle-fill',
warning: 'exclamation-circle-fill'
}[status!];
}[status];
this.widget.detectChanges();
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/form/src/sf.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ export class SFComponent implements OnInit, OnChanges, OnDestroy {
* this.sf.updateFeedback('/name');
* ```
*/
updateFeedback(path: string, status: NzFormControlStatusType = null, icon?: string | null): this {
updateFeedback(path: string, status: NzFormControlStatusType = '', icon?: string | null): this {
this.getProperty(path)?.updateFeedback(status, icon);
return this;
}
Expand Down
6 changes: 3 additions & 3 deletions packages/form/src/widgets/mention/mention.widget.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ describe('form: widget: mention', () => {
page
.newSchema(s)
.typeChar('@')
.checkCount('.ant-mention-dropdown-item', DATA.length, true)
.typeEvent('click', '.ant-mention-dropdown-item');
.checkCount('.ant-mentions-dropdown-menu-item', DATA.length, true)
.typeEvent('click', '.ant-mentions-dropdown-menu-item');

expect((s.properties!.a.ui as NzSafeAny).select).toHaveBeenCalled();
}));
Expand Down Expand Up @@ -69,6 +69,6 @@ describe('form: widget: mention', () => {
}
}
};
page.newSchema(s).dc(1).typeChar('@').checkElText('.ant-mention-dropdown-item', '1', true);
page.newSchema(s).dc(1).typeChar('@').checkElText('.ant-mentions-dropdown-menu-item', '1', true);
}));
});

0 comments on commit aa6c77b

Please sign in to comment.