← back to Commercialrealestate
broker-grid: nulls-last sort so sparse columns (Company/Firm) don't front-load a wall of —; add Mindmap nav entry
cfbe503cce81d3246faacdb18c135ff27c71942a · 2026-07-31 08:50:42 -0700 · Steve
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Files touched
M public/broker-grid.html
Diff
commit cfbe503cce81d3246faacdb18c135ff27c71942a
Author: Steve <steve@designerwallcoverings.com>
Date: Fri Jul 31 08:50:42 2026 -0700
broker-grid: nulls-last sort so sparse columns (Company/Firm) don't front-load a wall of —; add Mindmap nav entry
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---
public/broker-grid.html | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/public/broker-grid.html b/public/broker-grid.html
index 335f3c3..68cb0ff 100644
--- a/public/broker-grid.html
+++ b/public/broker-grid.html
@@ -92,7 +92,7 @@
<body>
<header>
<h1><b>👥 Brokers</b> & Agents</h1>
- <div class="nav"><a href="/crcp.html">← CRCP</a><a href="/">Explorer</a><a href="/mls.html">📋 Listings</a><a href="/gov-agents.html">🏛️ Gov-Licensed</a><a href="/linkedin.html">🔗 LinkedIn</a></div>
+ <div class="nav"><a href="/crcp.html">← CRCP</a><a href="/">Explorer</a><a href="/mls.html">📋 Listings</a><a href="/gov-agents.html">🏛️ Gov-Licensed</a><a href="/linkedin.html">🔗 LinkedIn</a><a href="/brokers.html">🕸️ Mindmap</a></div>
<span class="spacer"></span>
<input class="search" id="q" type="text" placeholder="search all fields — name, firm, phone, email, license, source… (space = AND)">
<div class="toggle" id="view"><button data-v="table" class="on">▦ List</button><button data-v="grid">▤ Grid</button></div>
@@ -276,8 +276,12 @@ function filtered(){
const c=COLS.find(x=>x.k===sortKey)||COLS[0];
rows=rows.slice().sort((a,b)=>{
let x=a[c.k], y=b[c.k];
- const xn=(x!=null&&x!==''&&!isNaN(+x)), yn=(y!=null&&y!==''&&!isNaN(+y));
- if(xn&&yn){ x=+x; y=+y; } else { x=String(x==null?'':x).toLowerCase(); y=String(y==null?'':y).toLowerCase(); }
+ // empty/null values always sink to the bottom, regardless of sort direction, so
+ // choosing a sparse column (e.g. Company / Firm) never front-loads a wall of "—"
+ const xE=(x==null||x===''), yE=(y==null||y==='');
+ if(xE&&yE) return 0; if(xE) return 1; if(yE) return -1;
+ const xn=!isNaN(+x), yn=!isNaN(+y);
+ if(xn&&yn){ x=+x; y=+y; } else { x=String(x).toLowerCase(); y=String(y).toLowerCase(); }
if(x<y) return -sortDir; if(x>y) return sortDir; return 0;
});
return rows;
← ea76efd B2B: assumable-loan lead viewer (/fha-leads.html, 100% HUD p
·
back to Commercialrealestate
·
RESELLABLE sale prices from public records: derive-sale-pric 5c7d62c →