From bec8fc847c4d3c5a2682ebaef0e0b389a69966be Mon Sep 17 00:00:00 2001 From: alanfoster Date: Sat, 2 Dec 2023 03:48:56 +0000 Subject: [PATCH] Update each tab to have a searchbar and filter present --- index.html | 107 ++++++++++++++++++++++----------------------------- js/script.js | 9 ++++- 2 files changed, 54 insertions(+), 62 deletions(-) diff --git a/index.html b/index.html index 5545342..c64115e 100644 --- a/index.html +++ b/index.html @@ -202,44 +202,44 @@ --> -
- -
-
-
- -
- - -
- -
+
+
+ +
+ + +
+ +
- -
- -
- + +
+ +
+ - -
- - - -
- -
+ +
+ + + +
+ +
+
+ +
@@ -340,17 +340,11 @@
- -
-
-
- + - -
-
-
+ +
@@ -395,15 +389,10 @@
-
-
- + - -
-
-
- + +
@@ -456,14 +445,10 @@
-
-
- + - -
-
-
+ +
@@ -507,10 +492,10 @@
+
- -
+
diff --git a/js/script.js b/js/script.js index 8cac3dd..4514b2b 100644 --- a/js/script.js +++ b/js/script.js @@ -358,7 +358,14 @@ const rsg = { } ); - const documentFragment = document.createDocumentFragment() + const documentFragment = document.createDocumentFragment(); + if (filteredItems.length === 0) { + const emptyMessage = document.createElement("button"); + emptyMessage.innerText = "No results found"; + emptyMessage.classList.add("list-group-item", "list-group-item-action", "disabled"); + + documentFragment.appendChild(emptyMessage); + } filteredItems.forEach((item, index) => { const { name,