FocusListDirective class
Used in conjunction with FocusItemDirective or other directive implementing FocusableItem, to provide a means to move focus between a list of components (or elements) by way of keyboard interaction.
The arrow keys move focus forward and backward in the list.
Tab order: Focus list represents single interactible element in tab order, tab will land to the first element in the list by default and then will move out of the list.
If user moved focus in the list, then tabs out and then tabs in back again the last focused element in the list will be focused.
This leads to better navigation both in and between the lists.
- Annotations
-
- @Directive(selector: '[focusList]')
Constructors
- FocusListDirective(NgZone _ngZone, @Attribute('role') String? role, @Attribute('ignoreUpAndDown') String? ignoreUpAndDown)
Properties
- autoFocusIndex ↔ int?
-
Index of the element to focus on when the list appears.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- ignoreUpAndDown ↔ bool
-
getter/setter pair
- ignoreUpAndDownStr → String
-
no setter
-
listItems
← List<
FocusableItem> -
no getter
- loop ↔ bool
-
Whether focus movement loops from the end of the list to the beginning of
the list. Default is
false
.getter/setter pair - role → String
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
focus(
int? index) → void -
ngOnDestroy(
) → void - Executed before the directive is removed from the DOM and destroyed.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setTabbable(
int index) → void -
Makes the
index
tab focusable and makes all other tabs unfocusable. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited