diff --git a/projects/demo/src/modules/components/primitive-textfield/examples/1/index.ts b/projects/demo/src/modules/components/primitive-textfield/examples/1/index.ts index 0eb72fc6e9ad..2eeb5400b2b5 100644 --- a/projects/demo/src/modules/components/primitive-textfield/examples/1/index.ts +++ b/projects/demo/src/modules/components/primitive-textfield/examples/1/index.ts @@ -42,7 +42,7 @@ export class TuiPrimitiveTextfieldExample1 extends AbstractTuiControl { } get focused(): boolean { - return !!this.textfield && this.textfield.focused; + return !!this.textfield?.focused; } get icon(): string { diff --git a/projects/demo/src/modules/components/primitive-textfield/examples/2/index.ts b/projects/demo/src/modules/components/primitive-textfield/examples/2/index.ts index 00d313aaa5ae..b3685c2b6340 100644 --- a/projects/demo/src/modules/components/primitive-textfield/examples/2/index.ts +++ b/projects/demo/src/modules/components/primitive-textfield/examples/2/index.ts @@ -45,7 +45,7 @@ export class TuiPrimitiveTextfieldExample2 extends AbstractTuiControl { } get focused(): boolean { - return !!this.textfield && this.textfield.focused; + return !!this.textfield?.focused; } onFocused(focused: boolean): void { diff --git a/projects/kit/components/input-copy/input-copy.component.ts b/projects/kit/components/input-copy/input-copy.component.ts index 9055215e1569..eb531d12c868 100644 --- a/projects/kit/components/input-copy/input-copy.component.ts +++ b/projects/kit/components/input-copy/input-copy.component.ts @@ -107,7 +107,7 @@ export class TuiInputCopyComponent } get focused(): boolean { - return !!this.textfield && this.textfield.focused; + return !!this.textfield?.focused; } get icon(): TuiInputCopyOptions['icon'] { diff --git a/projects/kit/components/input-date-range/input-date-range.component.ts b/projects/kit/components/input-date-range/input-date-range.component.ts index 29bcbff65390..775b598dc935 100644 --- a/projects/kit/components/input-date-range/input-date-range.component.ts +++ b/projects/kit/components/input-date-range/input-date-range.component.ts @@ -169,7 +169,7 @@ export class TuiInputDateRangeComponent } get focused(): boolean { - return !!this.textfield && this.textfield.focused; + return !!this.textfield?.focused; } get computedMobile(): boolean { diff --git a/projects/kit/components/input-date-time/input-date-time.component.ts b/projects/kit/components/input-date-time/input-date-time.component.ts index 810824f8a6e0..7cf7dc29e7b2 100644 --- a/projects/kit/components/input-date-time/input-date-time.component.ts +++ b/projects/kit/components/input-date-time/input-date-time.component.ts @@ -170,7 +170,7 @@ export class TuiInputDateTimeComponent } get focused(): boolean { - return !!this.textfield && this.textfield.focused; + return !!this.textfield?.focused; } get calendarIcon(): TuiInputDateOptions['icon'] { diff --git a/projects/kit/components/input-date/input-date.component.ts b/projects/kit/components/input-date/input-date.component.ts index 741e29933ced..b7d4c4248539 100644 --- a/projects/kit/components/input-date/input-date.component.ts +++ b/projects/kit/components/input-date/input-date.component.ts @@ -154,7 +154,7 @@ export class TuiInputDateComponent } get focused(): boolean { - return !!this.textfield && this.textfield.focused; + return !!this.textfield?.focused; } get computedMobile(): boolean { diff --git a/projects/kit/components/input-month-range/input-month-range.component.ts b/projects/kit/components/input-month-range/input-month-range.component.ts index 8260b9590143..8e85840aa788 100644 --- a/projects/kit/components/input-month-range/input-month-range.component.ts +++ b/projects/kit/components/input-month-range/input-month-range.component.ts @@ -109,7 +109,7 @@ export class TuiInputMonthRangeComponent } get focused(): boolean { - return !!this.textfield && this.textfield.focused; + return !!this.textfield?.focused; } get calendarIcon(): TuiInputDateOptions['icon'] { diff --git a/projects/kit/components/input-month/input-month.component.ts b/projects/kit/components/input-month/input-month.component.ts index 6f5408073739..829ff9be52b5 100644 --- a/projects/kit/components/input-month/input-month.component.ts +++ b/projects/kit/components/input-month/input-month.component.ts @@ -118,7 +118,7 @@ export class TuiInputMonthComponent } get focused(): boolean { - return !!this.textfield && this.textfield.focused; + return !!this.textfield?.focused; } get calendarIcon(): TuiInputDateOptions['icon'] { diff --git a/projects/kit/components/input-password/input-password.component.ts b/projects/kit/components/input-password/input-password.component.ts index 9cecd3105e66..8b8d2efb6e2d 100644 --- a/projects/kit/components/input-password/input-password.component.ts +++ b/projects/kit/components/input-password/input-password.component.ts @@ -107,7 +107,7 @@ export class TuiInputPasswordComponent } get focused(): boolean { - return !!this.textfield && this.textfield.focused; + return !!this.textfield?.focused; } get icon(): PolymorpheusContent> {