Do not disable FAYT results after previewing file

Refs #1294
This commit is contained in:
Will Abson 2016-12-16 14:34:02 +00:00
parent 5c2145dcf8
commit 8058b583dc
2 changed files with 4 additions and 5 deletions

View File

@ -351,7 +351,7 @@ describe('AlfrescoSearchControlComponent', () => {
}); });
}); });
it('should set un-active the search after file/folder is clicked', () => { it('should set deactivate the search after file/folder is clicked', () => {
component.searchActive = true; component.searchActive = true;
component.onFileClicked({ component.onFileClicked({
value: 'node12345' value: 'node12345'
@ -360,13 +360,13 @@ describe('AlfrescoSearchControlComponent', () => {
expect(component.searchActive).toBe(false); expect(component.searchActive).toBe(false);
}); });
it('should reset the search term after file/folder is clicked', () => { it('should NOT reset the search term after file/folder is clicked', () => {
component.liveSearchTerm = 'test'; component.liveSearchTerm = 'test';
component.onFileClicked({ component.onFileClicked({
value: 'node12345' value: 'node12345'
}); });
expect(component.liveSearchTerm).toBe(''); expect(component.liveSearchTerm).toBe('test');
}); });
}); });
}); });

View File

@ -170,8 +170,7 @@ export class AlfrescoSearchControlComponent implements OnInit, OnDestroy {
} }
onFileClicked(event): void { onFileClicked(event): void {
this.liveSearchTerm = ''; this.setAutoCompleteDisplayed(false);
this.searchActive = false;
this.fileSelect.emit(event); this.fileSelect.emit(event);
} }