[object Object]

← back to Rentv Sheet Enrich Refine

Sort: blanks sink to bottom so real Last Names lead A->Z

ea0de54ad8bcd2b0ea7e096f4b1a27efeff74fed · 2026-08-13 14:08:07 -0700 · Steve Abrams

Files touched

Diff

commit ea0de54ad8bcd2b0ea7e096f4b1a27efeff74fed
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Thu Aug 13 14:08:07 2026 -0700

    Sort: blanks sink to bottom so real Last Names lead A->Z
---
 public_live/index.html | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/public_live/index.html b/public_live/index.html
index 1af1136..92fd62a 100644
--- a/public_live/index.html
+++ b/public_live/index.html
@@ -181,7 +181,9 @@ function passes(r){
   return true;
 }
 function filtered(){ let rows=DATA.rows.map((r,i)=>[r,i]).filter(([r])=>passes(r));
-  if(SORT){ const ci=SORT.col,dir=SORT.dir; rows.sort((a,b)=>{const x=g(a[0],ci).toLowerCase(),y=g(b[0],ci).toLowerCase(); return (x<y?-1:x>y?1:0)*dir}); }
+  if(SORT){ const ci=SORT.col,dir=SORT.dir; rows.sort((a,b)=>{const x=g(a[0],ci).toLowerCase(),y=g(b[0],ci).toLowerCase();
+    if(!x&&!y)return 0; if(!x)return 1; if(!y)return -1;   // blanks always sink to the bottom
+    return (x<y?-1:x>y?1:0)*dir}); }
   return rows;
 }
 

← e9851ab Console: default sort = Last Name ascending on tab load  ·  back to Rentv Sheet Enrich Refine  ·  Console: resizable columns (drag edge, persists per tab via 6f48a2b →