mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-04-19 08:40:55 -04:00
Added a "No results found"
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
|
||||
let query = normalize($searchBox.val());
|
||||
let results = 0;
|
||||
let $noResultsMessage = $('.js-live-search-no-results');
|
||||
|
||||
$targets.each(function() {
|
||||
|
||||
@@ -39,6 +40,12 @@
|
||||
|
||||
});
|
||||
|
||||
if (query !== '' && results === 0) {
|
||||
$noResultsMessage.show();
|
||||
} else {
|
||||
$noResultsMessage.hide();
|
||||
}
|
||||
|
||||
if (state === 'loaded') {
|
||||
if (query !== '') {
|
||||
$searchBox.attr('aria-label', $searchLabel.text().trim() + ', ' + resultsSummary(results));
|
||||
|
||||
@@ -36,6 +36,9 @@
|
||||
{% endif %}
|
||||
|
||||
<div class="user-list">
|
||||
<div class="js-live-search-no-results margin-top-3" style="display: none;">
|
||||
<p class="usa-body margin-0">No results found</p>
|
||||
</div>
|
||||
{% for user in users %}
|
||||
{% if user.status != 'cancelled' %}
|
||||
<div class="user-list-item width-full">
|
||||
|
||||
Reference in New Issue
Block a user