Skip to content

Commit

Permalink
WEBUI-1490: Fix full text input requiring Enter key press in Default …
Browse files Browse the repository at this point in the history
…search
  • Loading branch information
rahuljain-dev committed Jul 4, 2024
1 parent 6816eed commit a6944d0
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion elements/search/nuxeo-search-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import { Polymer } from '@polymer/polymer/lib/legacy/polymer-fn.js';
import { html } from '@polymer/polymer/lib/utils/html-tag.js';
import { Debouncer } from '@polymer/polymer/lib/utils/debounce.js';
import { timeOut } from '@polymer/polymer/lib/utils/async.js';
import { FormatBehavior } from '@nuxeo/nuxeo-ui-elements/nuxeo-format-behavior.js';

/**
`nuxeo-search-form`
Expand Down Expand Up @@ -431,7 +432,7 @@ Polymer({
`,

is: 'nuxeo-search-form',
behaviors: [NotifyBehavior, I18nBehavior, RoutingBehavior, IronResizableBehavior],
behaviors: [NotifyBehavior, I18nBehavior, RoutingBehavior, IronResizableBehavior, FormatBehavior],
importMeta: import.meta,

properties: {
Expand Down Expand Up @@ -819,6 +820,17 @@ Polymer({
},

_search() {
if (this.form && this.form.searchTerm) {
this.set('params.ecm_fulltext', this.formatFulltext(this.form.searchTerm));
this.set(
'params.highlight',
'dc:title.fulltext,ecm:binarytext,dc:description.fulltext,ecm:tag,note:note.fulltext,file:content.name',
);
} else if (this.params && this.params.ecm_fulltext) {
this.set('params.ecm_fulltext', '');
delete this.params.ecm_fulltext;
delete this.params.highlight;
}
if (this.results && this._validate()) {
this.results.reset();
return this._fetch(this.results).then(this._navigateToResults.bind(this));
Expand Down

0 comments on commit a6944d0

Please sign in to comment.