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()
|
@Output()
|
||||||
preview = new EventEmitter();
|
preview = new EventEmitter();
|
||||||
|
|
||||||
|
@Output()
|
||||||
|
expand = new EventEmitter();
|
||||||
|
|
||||||
searchControl: Control;
|
searchControl: Control;
|
||||||
|
|
||||||
@Input()
|
@Input()
|
||||||
@@ -123,12 +126,22 @@ export class AlfrescoSearchControlComponent implements AfterViewInit {
|
|||||||
|
|
||||||
onFocus(): void {
|
onFocus(): void {
|
||||||
this.searchActive = true;
|
this.searchActive = true;
|
||||||
|
if (this.expandable) {
|
||||||
|
this.expand.emit({
|
||||||
|
expanded: true
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onBlur(): void {
|
onBlur(): void {
|
||||||
window.setTimeout(() => {
|
window.setTimeout(() => {
|
||||||
this.searchActive = false;
|
this.searchActive = false;
|
||||||
}, 200);
|
}, 200);
|
||||||
|
if (this.expandable && (this.searchControl.value === '' || this.searchControl.value === undefined)) {
|
||||||
|
this.expand.emit({
|
||||||
|
expanded: false
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user