Fixes to room search (#2343)

This commit is contained in:
Ahmad Farhat
2020-12-09 17:48:59 -05:00
committed by GitHub
parent a798c16929
commit 7809431873
4 changed files with 162 additions and 148 deletions

View File

@ -352,7 +352,11 @@ function checkIfAutoJoin() {
}
function filterRooms() {
const search_term = $('#room-search').val().toLowerCase(),
let search = $('#room-search').val()
if (search == undefined) { return }
let search_term = search.toLowerCase(),
rooms = $('#room_block_container > div:not(:last-child)');
clear_room_search = $('#clear-room-search');
@ -367,3 +371,8 @@ function filterRooms() {
room.style.display = (text.toLowerCase().indexOf(search_term) < 0) ? 'none' : 'block';
})
}
function clearRoomSearch() {
$('#room-search').val('');
filterRooms()
}