recent_topics: Add button to clear search.

This commit is contained in:
Aman Agrawal 2020-05-29 16:18:45 +05:30 committed by Tim Abbott
parent 9f50825610
commit 89fe133d2d
3 changed files with 13 additions and 0 deletions

View File

@ -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) {

View File

@ -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;

View File

@ -3,6 +3,9 @@
{{> recent_topics_filters}}
</div>
<input type="text" id="recent_topics_search" placeholder="{{t 'Search stream / topic' }}">
<button type="button" class="btn clear_search_button" id="recent_topics_search_clear">
<i class="fa fa-remove" aria-hidden="true"></i>
</button>
</div>
<div class="tableFixHead">
<table class="table table-responsive table-hover">