From 6b03ab1af6df8eeaeaa00a2ccdde61f26992cc68 Mon Sep 17 00:00:00 2001 From: davemachado Date: Thu, 17 Aug 2017 12:20:52 -0400 Subject: [PATCH] Use Vue method to filter search listings --- src/index.html | 8 ++++---- src/scripts.js | 20 -------------------- 2 files changed, 4 insertions(+), 24 deletions(-) diff --git a/src/index.html b/src/index.html index a6bb644..abb9d6f 100644 --- a/src/index.html +++ b/src/index.html @@ -23,10 +23,10 @@ -
- -
+
+ +
@@ -39,7 +39,7 @@ - + diff --git a/src/scripts.js b/src/scripts.js index ba969cc..fd5847e 100644 --- a/src/scripts.js +++ b/src/scripts.js @@ -34,23 +34,3 @@ new Vue({ } } }).$mount('#app'); - -function filterRows() { - var input, filter, table, tr, td, i; - input = document.getElementById("searchbox"); - filter = input.value.toUpperCase(); - table = document.getElementById("entries"); - tr = table.getElementsByTagName("tr"); - - // Loop through all table rows and hide those who don't match the search - for (i = 0; i < tr.length; i++) { - td = tr[i].getElementsByTagName("td")[0]; - if (td) { - if (td.innerHTML.toUpperCase().indexOf(filter) > -1) { - tr[i].style.display = ""; - } else { - tr[i].style.display = "none"; - } - } - } -} \ No newline at end of file
{{ item.API }} {{ item.Description }} {{ (item.Auth) ? item.Auth : '-' }}