diff --git a/static/js/click_handlers.js b/static/js/click_handlers.js index 5917849fe8..c5bca870e8 100644 --- a/static/js/click_handlers.js +++ b/static/js/click_handlers.js @@ -367,6 +367,12 @@ exports.initialize = function () { // Wait for user to go idle before initiating search. }, 300)); + $('body').on('click', '#recent_topics_search_clear', function (e) { + e.stopPropagation(); + $('#recent_topics_search').val(""); + recent_topics.update_filters_view(); + }); + // RECIPIENT BARS function get_row_id_for_narrowing(narrow_link_elem) { diff --git a/static/styles/recent_topics.scss b/static/styles/recent_topics.scss index 3507ec7fdc..a6c80a3a46 100644 --- a/static/styles/recent_topics.scss +++ b/static/styles/recent_topics.scss @@ -92,6 +92,10 @@ flex-grow: 1; } + #recent_topics_search_clear { + margin-top: -10px !important; + } + .btn-recent-filters { border-radius: 40px; margin: 0 5px 10px 0; diff --git a/static/templates/recent_topics_table.hbs b/static/templates/recent_topics_table.hbs index 82a60f517b..986212af38 100644 --- a/static/templates/recent_topics_table.hbs +++ b/static/templates/recent_topics_table.hbs @@ -3,6 +3,9 @@ {{> recent_topics_filters}} +