IgxFocusDirective

new IgxFocusDirective(): IgxFocusDirective

Returns IgxFocusDirective

Returns the state of the igxFocus.

@ViewChild('focusContainer', {read: IgxFocusDirective})
public igxFocus: IgxFocusDirective;
let isFocusOn = this.igxFocus.focused;
get focused(): boolean

Defined in projects/igniteui-angular/directives/src/directives/focus/focus.directive.ts:29

Returns boolean

Sets the state of the igxFocus.

<igx-input-group >
 <input #focusContainer igxInput [igxFocus]="true"/>
</igx-input-group>
set focused(val: boolean): void

Defined in projects/igniteui-angular/directives/src/directives/focus/focus.directive.ts:43

Parameters

  • val: boolean

Returns void

Gets the native element of the igxFocus.

@ViewChild('focusContainer', {read: IgxFocusDirective})
public igxFocus: IgxFocusDirective;
let igxFocusNativeElement = this.igxFocus.nativeElement;
get nativeElement(): any

Defined in projects/igniteui-angular/directives/src/directives/focus/focus.directive.ts:58

Returns any

Triggers the igxFocus state.

@ViewChild('focusContainer', {read: IgxFocusDirective})
public igxFocus: IgxFocusDirective;
this.igxFocus.trigger();
trigger(): void

Defined in projects/igniteui-angular/directives/src/directives/focus/focus.directive.ts:80

Returns void