diff --git a/addons/web/static/src/js/search.js b/addons/web/static/src/js/search.js index fdeaacfd2ff..a0795e45427 100644 --- a/addons/web/static/src/js/search.js +++ b/addons/web/static/src/js/search.js @@ -42,10 +42,11 @@ if (SearchBox_renderSearchInput.toString() !== VS.ui.SearchBox.prototype.renderS } var SearchBox_searchEvent = function (e) { var query = this.value(); + this.renderFacets(); this.app.options.callbacks.search(query, this.app.searchQuery); }; if (SearchBox_searchEvent.toString() !== VS.ui.SearchBox.prototype.searchEvent.toString().replace( - /this\.focusSearch\(e\);\n[ ]{4}this\.value\(query\);\n[ ]{4}/, '')) { + /this\.focusSearch\(e\);\n[ ]{4}this\.value\(query\)/, 'this.renderFacets()')) { throw new Error( "Trying to replace wrong version of VS.ui.SearchBox#searchEvent. " + "Please fix replacement."); diff --git a/doc/search-view.rst b/doc/search-view.rst index 762d1dd5a6c..17a5914d33b 100644 --- a/doc/search-view.rst +++ b/doc/search-view.rst @@ -99,7 +99,7 @@ Finally, :js:func:`VS.ui.SearchBox.searchEvent` is monkey-patched to get rid of its serialize/load round-tripping of facet data: the additional attributes needed by the search view don't round-trip (at all) so VisualSearch must not load any data from its (fairly -simplistic) text-serialization format +simplistic) text-serialization format. .. note::