-
Couldn't load subscription status.
- Fork 156
igxFocusDirective Specification
Radoslav Karaivanov edited this page Apr 5, 2018
·
2 revisions
IgxFocus should focus the element it is applied on.
<input type="text" [igxFocus]="true" />As a developer I want to be able to force auto focus to any given element whenever it appears into the DOM.
As an end user I would like to focus the element where directive is applied right after it appears into the DOM.
Automatically focusing the cell of igxGrid when we are entering into edit mode.
| Name | Type | Description |
|---|---|---|
| igxFocus | boolean | Determines whether the element should be focusable through the directive. |
| Name | Type | Description |
|---|---|---|
| focused | boolean | Returns whether the element is focused or not. |
| nativeElement | ElementRef | Returns the nativeElement of the element where the directive was applied. |
| Name | Type | Description |
|---|---|---|
| trigger | void | Triggers the focus of the element. |
The host element for the directive should be focusable - i.e. it should be a native input element or an element with a tabindex attribute set.