search: Do not narrow on updation of search pills.

Previously we narrowed every time a search pill was created or deleted.
This commit allows the user to be able to continue typing without the
lag of narrowing.
This behaviour matches with the legacy version, whose code path remains
unchanged.
This commit is contained in:
Ryan Rehman 2020-06-17 19:28:43 +05:30 committed by Tim Abbott
parent 6ce43f3ede
commit 4ed4aa7b6f
2 changed files with 1 additions and 4 deletions

View File

@ -93,6 +93,7 @@ exports.initialize = function () {
if (page_params.search_pills_enabled) {
search_pill.append_search_string(search_string,
search_pill_widget.widget);
return search_query_box.val();
}
return exports.narrow_or_search_for_term(search_string);
},

View File

@ -5,10 +5,6 @@ exports.initialize = function () {
const container = $('#search_arrows');
exports.widget = search_pill.create_pills(container);
exports.widget.onPillRemove(function () {
search.narrow_or_search_for_term();
});
exports.widget.createPillonPaste(function () {
return false;
});