summaryrefslogtreecommitdiff
path: root/iridescence/src/store
diff options
context:
space:
mode:
authorAdam T. Carpenter <atc@53hor.net>2021-01-04 16:41:42 -0500
committerAdam T. Carpenter <atc@53hor.net>2021-01-04 16:41:42 -0500
commit6991872a00dc25d8009aeca4abbb8fd5c8bf2a5b (patch)
tree63761451b8a061afae9077e80b2512558d35c86f /iridescence/src/store
parentfceb8ffc0c551d0da5bfd936bbc4a54b07e8f4c4 (diff)
downloadtheglassyladies-6991872a00dc25d8009aeca4abbb8fd5c8bf2a5b.tar.xz
theglassyladies-6991872a00dc25d8009aeca4abbb8fd5c8bf2a5b.zip
sped up searching by only searching product fields that matter, cleaned
up nav
Diffstat (limited to 'iridescence/src/store')
-rw-r--r--iridescence/src/store/index.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/iridescence/src/store/index.js b/iridescence/src/store/index.js
index e2d970d..b324bd1 100644
--- a/iridescence/src/store/index.js
+++ b/iridescence/src/store/index.js
@@ -19,7 +19,13 @@ export default new Vuex.Store({
products(state) {
return state.products
.filter(item => {
- return JSON.stringify(item)
+ let haystack = [
+ item.id,
+ item.name,
+ item.description,
+ item.category
+ ].join("");
+ return haystack
.toLowerCase()
.includes(state.searchTerm.toLowerCase());
})