mirror of
https://github.com/vinta/awesome-python.git
synced 2026-05-23 17:40:32 +08:00
feat: add clear action to no-results message
When a search or filter yields no results, the message now includes an inline button that resets both the search input and the active filter. Improves discoverability and reduces dead-end frustration. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -270,6 +270,16 @@ if (filterClear) {
|
||||
});
|
||||
}
|
||||
|
||||
// No-results clear
|
||||
var noResultsClear = document.querySelector('.no-results-clear');
|
||||
if (noResultsClear) {
|
||||
noResultsClear.addEventListener('click', function () {
|
||||
if (searchInput) searchInput.value = '';
|
||||
activeFilter = null;
|
||||
applyFilters();
|
||||
});
|
||||
}
|
||||
|
||||
// Column sorting
|
||||
document.querySelectorAll('th[data-sort]').forEach(function (th) {
|
||||
th.addEventListener('click', function () {
|
||||
|
||||
Reference in New Issue
Block a user