Skip to content

Commit

Permalink
[sc-11404] Do not trigger a search when configuration changes (#1917)
Browse files Browse the repository at this point in the history
  • Loading branch information
operramon authored Jan 17, 2025
1 parent 787b792 commit 977c20d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,7 @@ export class SearchConfigurationComponent {

private updateWidget() {
if (this.currentConfig) {
this.lastQuery = undefined;
this.configUpdate.emit(this.currentConfig);
}
}
Expand Down
2 changes: 1 addition & 1 deletion libs/common/src/lib/search-widget/search-widget.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 977c20d

Please sign in to comment.