← back to Flockedwallpaper
Hero search keeps the active sort order applied instead of resetting to DB order
075035f606904b50dde4f0298364460dce8efffc · 2026-05-18 20:34:43 -0700 · Steve
Files touched
Diff
commit 075035f606904b50dde4f0298364460dce8efffc
Author: Steve <steve@designerwallcoverings.com>
Date: Mon May 18 20:34:43 2026 -0700
Hero search keeps the active sort order applied instead of resetting to DB order
---
index.html | 3 +++
1 file changed, 3 insertions(+)
diff --git a/index.html b/index.html
index 685b9f1..83dbaa1 100644
--- a/index.html
+++ b/index.html
@@ -399,6 +399,9 @@ function filterProducts(){
displayed=0;
document.getElementById('productGrid').innerHTML='';
filteredProducts=q?allProducts.filter(p=>(p.title||'').toLowerCase().includes(q)||(p.primaryColor||'').toLowerCase().includes(q)):[...allProducts];
+ let curSort='newest';
+ try{curSort=(JSON.parse(localStorage.getItem('flockedwallpaper_grid')||'{}').sort)||'newest';}catch{}
+ filteredProducts=sortProducts(filteredProducts,curSort);
displayBatch();
}
← d957aed server.js: confine static file serving to project root — blo
·
back to Flockedwallpaper
·
gitignore: also exclude plain *.bak files 2518b85 →