Skip to content

Commit

Permalink
[Search Embeddable] Add highlighting when searching
Browse files Browse the repository at this point in the history
  • Loading branch information
Maja Grubic committed Mar 2, 2021
1 parent c502e4c commit 5e81400
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,11 @@ export class SearchEmbeddable
if (forceFetch || isFetchRequired) {
this.filtersSearchSource!.setField('filter', this.input.filters);
this.filtersSearchSource!.setField('query', this.input.query);
if (this.input.query?.query || this.input.filters?.length) {
this.filtersSearchSource!.setField('highlightAll', true);
} else {
this.filtersSearchSource!.removeField('highlightAll');
}

this.prevFilters = this.input.filters;
this.prevQuery = this.input.query;
Expand Down

0 comments on commit 5e81400

Please sign in to comment.