mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
@@ -53,6 +53,9 @@ export class AlfrescoSearchControlComponent implements AfterViewInit {
|
||||
@Output()
|
||||
preview = new EventEmitter();
|
||||
|
||||
@Output()
|
||||
expand = new EventEmitter();
|
||||
|
||||
searchControl: Control;
|
||||
|
||||
@Input()
|
||||
@@ -123,12 +126,22 @@ export class AlfrescoSearchControlComponent implements AfterViewInit {
|
||||
|
||||
onFocus(): void {
|
||||
this.searchActive = true;
|
||||
if (this.expandable) {
|
||||
this.expand.emit({
|
||||
expanded: true
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
onBlur(): void {
|
||||
window.setTimeout(() => {
|
||||
this.searchActive = false;
|
||||
}, 200);
|
||||
if (this.expandable && (this.searchControl.value === '' || this.searchControl.value === undefined)) {
|
||||
this.expand.emit({
|
||||
expanded: false
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user