mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
fix search miss typing
This commit is contained in:
@@ -209,7 +209,7 @@ describe('ActivitiStartProcessInstance', () => {
|
|||||||
it('should call service to start process with the variables setted', async(() => {
|
it('should call service to start process with the variables setted', async(() => {
|
||||||
let inputProcessVariable: RestVariable[] = [];
|
let inputProcessVariable: RestVariable[] = [];
|
||||||
|
|
||||||
let variable: RestVariable;
|
let variable: RestVariable = {};
|
||||||
variable.name = 'nodeId';
|
variable.name = 'nodeId';
|
||||||
variable.value = 'id';
|
variable.value = 'id';
|
||||||
|
|
||||||
|
@@ -78,7 +78,7 @@ describe('AlfrescoSearchControlComponent', () => {
|
|||||||
expect(e.valid).toBe(true);
|
expect(e.valid).toBe(true);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
component.searchControl.setValue('customSearchTerm211', true);
|
component.searchControl.setValue('customSearchTerm211');
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -293,7 +293,7 @@ describe('AlfrescoSearchControlComponent', () => {
|
|||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
let formEl: HTMLElement = element.querySelector('form');
|
let formEl: HTMLElement = element.querySelector('form');
|
||||||
component.searchTerm = 'searchTerm1';
|
component.searchTerm = 'searchTerm1';
|
||||||
component.searchControl.setValue('searchTerm1', true);
|
component.searchControl.setValue('searchTerm1');
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
formEl.dispatchEvent(new Event('submit'));
|
formEl.dispatchEvent(new Event('submit'));
|
||||||
|
|
||||||
|
@@ -112,7 +112,7 @@ export class AlfrescoSearchControlComponent implements OnInit, OnDestroy {
|
|||||||
private onSearchTermChange(value: string): void {
|
private onSearchTermChange(value: string): void {
|
||||||
this.searchValid = this.searchControl.valid;
|
this.searchValid = this.searchControl.valid;
|
||||||
this.liveSearchTerm = this.searchValid ? value : '';
|
this.liveSearchTerm = this.searchValid ? value : '';
|
||||||
this.searchControl.setValue(value, true);
|
this.searchControl.setValue(value);
|
||||||
this.searchChange.emit({
|
this.searchChange.emit({
|
||||||
value: value,
|
value: value,
|
||||||
valid: this.searchValid
|
valid: this.searchValid
|
||||||
@@ -151,7 +151,7 @@ export class AlfrescoSearchControlComponent implements OnInit, OnDestroy {
|
|||||||
* @param event Submit event that was fired
|
* @param event Submit event that was fired
|
||||||
*/
|
*/
|
||||||
onSearch(event): void {
|
onSearch(event): void {
|
||||||
this.searchControl.setValue(this.searchTerm, true);
|
this.searchControl.setValue(this.searchTerm);
|
||||||
if (this.searchControl.valid) {
|
if (this.searchControl.valid) {
|
||||||
this.searchSubmit.emit({
|
this.searchSubmit.emit({
|
||||||
value: this.searchTerm
|
value: this.searchTerm
|
||||||
|
Reference in New Issue
Block a user