diff --git a/libs/common/src/lib/search-widget/search-configuration/search-configuration.component.ts b/libs/common/src/lib/search-widget/search-configuration/search-configuration.component.ts index 086381c79..5b4e7ecca 100644 --- a/libs/common/src/lib/search-widget/search-configuration/search-configuration.component.ts +++ b/libs/common/src/lib/search-widget/search-configuration/search-configuration.component.ts @@ -423,6 +423,7 @@ export class SearchConfigurationComponent { private updateWidget() { if (this.currentConfig) { + this.lastQuery = undefined; this.configUpdate.emit(this.currentConfig); } } diff --git a/libs/common/src/lib/search-widget/search-widget.service.ts b/libs/common/src/lib/search-widget/search-widget.service.ts index d82e128d9..5f3c80bb8 100644 --- a/libs/common/src/lib/search-widget/search-widget.service.ts +++ b/libs/common/src/lib/search-widget/search-widget.service.ts @@ -245,7 +245,7 @@ export class SearchWidgetService { private reinitWidgetPreview() { const searchWidget = document.getElementsByTagName('nuclia-search-bar')[0] as unknown as any; if (this.currentQuery) { - searchWidget?.search(this.currentQuery, this.currentFilters); + searchWidget?.search(this.currentQuery, this.currentFilters, true); } searchWidget?.addEventListener('search', (event: { detail: { query: string; filters: string[] } }) => { this.currentQuery = event.detail.query;