diff --git a/src/app/shared/components/configuration/configuration-select-field/configuration-select-field.component.ts b/src/app/shared/components/configuration/configuration-select-field/configuration-select-field.component.ts index ba6659d73..fec70f952 100644 --- a/src/app/shared/components/configuration/configuration-select-field/configuration-select-field.component.ts +++ b/src/app/shared/components/configuration/configuration-select-field/configuration-select-field.component.ts @@ -149,7 +149,7 @@ export class ConfigurationSelectFieldComponent implements OnInit { } searchOptions(event: any) { - this.searchOptionsDropdown.emit({ searchTerm: event.filter, destinationAttributes: this.destinationAttributes, destinationOptionKey: this.destinationOptionKey }); + this.searchOptionsDropdown.emit({ searchTerm: (event.filter as string).trim(), destinationAttributes: this.destinationAttributes, destinationOptionKey: this.destinationOptionKey }); } ngOnInit(): void { diff --git a/src/app/shared/components/helper/mapping/generic-mapping-table/generic-mapping-table.component.ts b/src/app/shared/components/helper/mapping/generic-mapping-table/generic-mapping-table.component.ts index 7faebfa45..895d98e5a 100644 --- a/src/app/shared/components/helper/mapping/generic-mapping-table/generic-mapping-table.component.ts +++ b/src/app/shared/components/helper/mapping/generic-mapping-table/generic-mapping-table.component.ts @@ -138,7 +138,7 @@ export class GenericMappingTableComponent implements OnInit { searchOptions(event: any) { if (event.filter) { this.isSearching = true; - this.optionSearchUpdate.next({searchTerm: event.filter}); + this.optionSearchUpdate.next({searchTerm: (event.filter as string).trim()}); } } diff --git a/src/app/shared/components/helper/mapping/mapping-filter/mapping-filter.component.ts b/src/app/shared/components/helper/mapping/mapping-filter/mapping-filter.component.ts index 119573514..05b485d29 100644 --- a/src/app/shared/components/helper/mapping/mapping-filter/mapping-filter.component.ts +++ b/src/app/shared/components/helper/mapping/mapping-filter/mapping-filter.component.ts @@ -70,7 +70,7 @@ export class MappingFilterComponent implements OnInit { searchingFilter(): void { this.form.controls.searchOption.valueChanges.subscribe((searchValue) => { - this.mappingSearchingEvent.emit(searchValue); + this.mappingSearchingEvent.emit((searchValue as string).trim()); }); } diff --git a/src/app/shared/components/input/search/search.component.ts b/src/app/shared/components/input/search/search.component.ts index 3e549c927..5b06df96e 100644 --- a/src/app/shared/components/input/search/search.component.ts +++ b/src/app/shared/components/input/search/search.component.ts @@ -59,7 +59,7 @@ export class SearchComponent implements OnInit { private searchQueryWatcher(): void { this.form.controls.searchOption.valueChanges.subscribe((value) => { - this.handleSimpleSearch.emit(value); + this.handleSimpleSearch.emit((value as string).trim()); }); }