From 364060841c39c12973e6edd1854d251d5d8011c9 Mon Sep 17 00:00:00 2001 From: Leon Sandøy Date: Sun, 13 Feb 2022 10:26:51 +0100 Subject: Trigger a UI update when typing into search. --- pydis_site/static/js/resources/resources.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'pydis_site/static/js/resources/resources.js') diff --git a/pydis_site/static/js/resources/resources.js b/pydis_site/static/js/resources/resources.js index c4d01f9d..348571e6 100644 --- a/pydis_site/static/js/resources/resources.js +++ b/pydis_site/static/js/resources/resources.js @@ -246,6 +246,11 @@ document.addEventListener("DOMContentLoaded", function () { setTimeout(() => { categoryHeaders.removeClass("no-transition"); }, 10); } + // When you type into the search bar, trigger an UI update. + $("#resource-search input").on("input", function() { + updateUI(); + }); + // If you click on the div surrounding the filter checkbox, it clicks the corresponding checkbox. $('.filter-panel').on("click",function(event) { let hitsCheckbox = Boolean(String(event.target)); -- cgit v1.2.3