From 6315acae94721488358b6044ee1fa6285a6a0606 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Thu, 19 Dec 2019 23:34:36 +0100 Subject: [PATCH] fix(forms): disabled input acceptance member not properly applied (#34502) With 5cecd97493025cd940c9ade4ea9f1836d5b05cc8 we intended to expand the input type of the `disabled` input of the `NgModel` directive. Read more about the reason for this in the actual commit message. Currently though, the acceptance coercion member does not have any effect. This is because the acceptance member needs to refer to the actual input property name, and not to the public input name. `disabled` corresponds to the `isDisabled` property. PR Close #34502 --- packages/forms/src/directives/ng_model.ts | 2 +- tools/public_api_guard/forms/forms.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/forms/src/directives/ng_model.ts b/packages/forms/src/directives/ng_model.ts index 1a91885f27..b85aa6f240 100644 --- a/packages/forms/src/directives/ng_model.ts +++ b/packages/forms/src/directives/ng_model.ts @@ -144,7 +144,7 @@ export class NgModel extends NgControl implements OnChanges, // This static member tells the compiler that values of type "string" can also be assigned // to the input in a template. /** @nodoc */ - static ngAcceptInputType_disabled: boolean|string; + static ngAcceptInputType_isDisabled: boolean|string; /** @internal */ _registered = false; diff --git a/tools/public_api_guard/forms/forms.d.ts b/tools/public_api_guard/forms/forms.d.ts index 4780d5b0f7..685841ba05 100644 --- a/tools/public_api_guard/forms/forms.d.ts +++ b/tools/public_api_guard/forms/forms.d.ts @@ -415,7 +415,7 @@ export declare class NgModel extends NgControl implements OnChanges, OnDestroy { ngOnChanges(changes: SimpleChanges): void; ngOnDestroy(): void; viewToModelUpdate(newValue: any): void; - static ngAcceptInputType_disabled: boolean | string; + static ngAcceptInputType_isDisabled: boolean | string; } export declare class NgModelGroup extends AbstractFormGroupDirective implements OnInit, OnDestroy {