Files
zulip/static/js/search_pill_widget.js
Aman Agrawal 0859a91b14 hashchange: Go through hashchange to narrow to All messsages.
We should not allow every function who wants to narrow to All
messages to come up with their own method to do so. This
commit makes existing such functions use hashchange library to
do so.

Remove click event on All message button, it already contains
an <a> tag which navigates correctly.
2020-07-28 16:33:32 -07:00

18 lines
449 B
JavaScript

exports.initialize = function () {
if (!page_params.search_pills_enabled) {
return;
}
const container = $("#search_arrows");
exports.widget = search_pill.create_pills(container);
exports.widget.onPillRemove(() => {
if (exports.widget.items().length === 0) {
hashchange.go_to_location("");
}
});
exports.widget.createPillonPaste(() => false);
};
window.search_pill_widget = exports;