mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
@@ -43,6 +43,9 @@ export class AlfrescoSearchAutocompleteComponent implements OnInit, OnChanges {
|
||||
@Output()
|
||||
preview: EventEmitter<any> = new EventEmitter();
|
||||
|
||||
@Output()
|
||||
blurEmitter: EventEmitter<any> = new EventEmitter();
|
||||
|
||||
@Output()
|
||||
resultsEmitter = new EventEmitter();
|
||||
|
||||
@@ -129,4 +132,33 @@ export class AlfrescoSearchAutocompleteComponent implements OnInit, OnChanges {
|
||||
}
|
||||
}
|
||||
|
||||
onRowBlur(node): void {
|
||||
window.setTimeout(() => {
|
||||
let focusedEl = document.activeElement;
|
||||
if (focusedEl && focusedEl.id && focusedEl.id.indexOf('result_row_') === 0) {
|
||||
return;
|
||||
}
|
||||
this.blurEmitter.emit(node);
|
||||
}, 100);
|
||||
console.log('row blur', node);
|
||||
}
|
||||
|
||||
onRowFocus(node): void {
|
||||
console.log('row focus', node);
|
||||
}
|
||||
|
||||
onRowEnter(node): void {
|
||||
if (node && node.entry) {
|
||||
if (node.entry.isFile) {
|
||||
this.preview.emit({
|
||||
value: node
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
onFocusOut(): void {
|
||||
console.log('onfocusout');
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user