mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
Avoid later cast through type in declarations
This commit is contained in:
@@ -128,8 +128,8 @@ export class AlfrescoSearchAutocompleteComponent implements OnInit, OnChanges {
|
|||||||
}
|
}
|
||||||
|
|
||||||
focusResult(): void {
|
focusResult(): void {
|
||||||
let firstResult = this.resultsTableBody.nativeElement.querySelector('tr');
|
let firstResult: any = this.resultsTableBody.nativeElement.querySelector('tr');
|
||||||
(<any> firstResult).focus();
|
firstResult.focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
onItemClick(node): void {
|
onItemClick(node): void {
|
||||||
@@ -169,16 +169,16 @@ export class AlfrescoSearchAutocompleteComponent implements OnInit, OnChanges {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onRowArrowDown($event: KeyboardEvent): void {
|
onRowArrowDown($event: KeyboardEvent): void {
|
||||||
let nextElement = this.getNextElementSibling(<Element> $event.target);
|
let nextElement: any = this.getNextElementSibling(<Element> $event.target);
|
||||||
if (nextElement) {
|
if (nextElement) {
|
||||||
(<any> nextElement).focus();
|
nextElement.focus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onRowArrowUp($event: KeyboardEvent): void {
|
onRowArrowUp($event: KeyboardEvent): void {
|
||||||
let previousElement = this.getPreviousElementSibling(<Element> $event.target);
|
let previousElement: any = this.getPreviousElementSibling(<Element> $event.target);
|
||||||
if (previousElement) {
|
if (previousElement) {
|
||||||
(<any> previousElement).focus();
|
previousElement.focus();
|
||||||
} else {
|
} else {
|
||||||
this.scrollBack.emit($event);
|
this.scrollBack.emit($event);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user