Preview search-as-you-type results in the viewer

Refs #173
This commit is contained in:
Will Abson
2016-06-09 18:30:56 +01:00
parent fc939a4c98
commit e67d043a54
6 changed files with 41 additions and 30 deletions

View File

@@ -51,6 +51,9 @@ export class AlfrescoSearchControlComponent implements AfterViewInit {
@Output()
searchChange = new EventEmitter();
@Output()
preview = new EventEmitter();
searchControl: Control;
@Input()
@@ -111,18 +114,20 @@ export class AlfrescoSearchControlComponent implements AfterViewInit {
}
}
onFocus(event) {
if (event) {
event.preventDefault();
}
onFileClicked(event) {
this.preview.emit({
value: event.value
});
}
onFocus() {
this.searchActive = true;
}
onBlur(event) {
if (event) {
event.preventDefault();
}
this.searchActive = false;
onBlur() {
window.setTimeout(() => {
this.searchActive = false;
}, 100);
}
}