Skip to content

Commit d5b4659

Browse files
committed
fix(input): Set form enabled/disabled #7086
1 parent e7eda38 commit d5b4659

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

projects/igniteui-angular/src/lib/directives/input/input.directive.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export enum IgxInputState {
3939
* @example
4040
* ```html
4141
* <input-group>
42-
* <label for="address">Adress</label>
42+
* <label for="address">Address</label>
4343
* <input igxInput name="address" type="text" [(ngModel)]="customer.address">
4444
* </input-group>
4545
* ```
@@ -289,6 +289,10 @@ export class IgxInputDirective implements AfterViewInit, OnDestroy {
289289
* @internal
290290
*/
291291
protected onStatusChanged() {
292+
// Enable/Disable control based on ngControl #7086
293+
if (this.disabled !== this.ngControl.disabled) {
294+
this.disabled = this.ngControl.disabled;
295+
}
292296
if (this.ngControl.control.validator || this.ngControl.control.asyncValidator) {
293297
if (this.ngControl.control.touched || this.ngControl.control.dirty) {
294298
// TODO: check the logic when control is touched or dirty

0 commit comments

Comments
 (0)