From 9b24adc1081adf4821cffe31b9820a681820c027 Mon Sep 17 00:00:00 2001 From: Richard Leurs <7275740+NextNebula@users.noreply.github.com> Date: Sat, 10 Oct 2020 19:11:24 +0200 Subject: [PATCH] Reset integrations search to all if search input is emptied (#15165) Co-authored-by: Richard Leurs <7275740+EarthlingRich@users.noreply.github.com> --- source/integrations/index.html | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/integrations/index.html b/source/integrations/index.html index 1fc6a130790..e51e9d61613 100644 --- a/source/integrations/index.html +++ b/source/integrations/index.html @@ -263,10 +263,13 @@ allComponents.pop(); // remove placeholder element at the end var text = $(this).val(); // sanitize input text = text.replace(/[(\?|\&\{\}\(\))]/gi, '').trim(); - if (typeof text === "string" && text.length !== 0) { + if (typeof text === "string" && text.length >= 1) { updateHash('#search/' + text); - applyFilter(); } + else { + updateHash('#all'); + } + applyFilter(); }, 500)); window.addEventListener('hashchange', applyFilter);