mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +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 {
|
||||
let firstResult = this.resultsTableBody.nativeElement.querySelector('tr');
|
||||
(<any> firstResult).focus();
|
||||
let firstResult: any = this.resultsTableBody.nativeElement.querySelector('tr');
|
||||
firstResult.focus();
|
||||
}
|
||||
|
||||
onItemClick(node): void {
|
||||
@@ -169,16 +169,16 @@ export class AlfrescoSearchAutocompleteComponent implements OnInit, OnChanges {
|
||||
}
|
||||
|
||||
onRowArrowDown($event: KeyboardEvent): void {
|
||||
let nextElement = this.getNextElementSibling(<Element> $event.target);
|
||||
let nextElement: any = this.getNextElementSibling(<Element> $event.target);
|
||||
if (nextElement) {
|
||||
(<any> nextElement).focus();
|
||||
nextElement.focus();
|
||||
}
|
||||
}
|
||||
|
||||
onRowArrowUp($event: KeyboardEvent): void {
|
||||
let previousElement = this.getPreviousElementSibling(<Element> $event.target);
|
||||
let previousElement: any = this.getPreviousElementSibling(<Element> $event.target);
|
||||
if (previousElement) {
|
||||
(<any> previousElement).focus();
|
||||
previousElement.focus();
|
||||
} else {
|
||||
this.scrollBack.emit($event);
|
||||
}
|
||||
|
Reference in New Issue
Block a user