fix search miss typing

This commit is contained in:
Eugenio Romano
2017-06-29 13:18:48 +01:00
parent 78bf96481e
commit 0317cb4e3b
3 changed files with 5 additions and 5 deletions

View File

@@ -209,7 +209,7 @@ describe('ActivitiStartProcessInstance', () => {
it('should call service to start process with the variables setted', async(() => {
let inputProcessVariable: RestVariable[] = [];
let variable: RestVariable;
let variable: RestVariable = {};
variable.name = 'nodeId';
variable.value = 'id';

View File

@@ -78,7 +78,7 @@ describe('AlfrescoSearchControlComponent', () => {
expect(e.valid).toBe(true);
done();
});
component.searchControl.setValue('customSearchTerm211', true);
component.searchControl.setValue('customSearchTerm211');
fixture.detectChanges();
});
@@ -293,7 +293,7 @@ describe('AlfrescoSearchControlComponent', () => {
fixture.detectChanges();
let formEl: HTMLElement = element.querySelector('form');
component.searchTerm = 'searchTerm1';
component.searchControl.setValue('searchTerm1', true);
component.searchControl.setValue('searchTerm1');
fixture.detectChanges();
formEl.dispatchEvent(new Event('submit'));

View File

@@ -112,7 +112,7 @@ export class AlfrescoSearchControlComponent implements OnInit, OnDestroy {
private onSearchTermChange(value: string): void {
this.searchValid = this.searchControl.valid;
this.liveSearchTerm = this.searchValid ? value : '';
this.searchControl.setValue(value, true);
this.searchControl.setValue(value);
this.searchChange.emit({
value: value,
valid: this.searchValid
@@ -151,7 +151,7 @@ export class AlfrescoSearchControlComponent implements OnInit, OnDestroy {
* @param event Submit event that was fired
*/
onSearch(event): void {
this.searchControl.setValue(this.searchTerm, true);
this.searchControl.setValue(this.searchTerm);
if (this.searchControl.valid) {
this.searchSubmit.emit({
value: this.searchTerm