[object Object]

← back to Commercialrealestate

mls viewer: land populated (all 22,948 listings) instead of empty 'pick a filter' state — Amazon-style default view

47bee700aa97d18a56705782734fee3993749067 · 2026-07-30 21:15:53 -0700 · Steve Abrams (DW)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Files touched

Diff

commit 47bee700aa97d18a56705782734fee3993749067
Author: Steve Abrams (DW) <steve@designerwallcoverings.com>
Date:   Thu Jul 30 21:15:53 2026 -0700

    mls viewer: land populated (all 22,948 listings) instead of empty 'pick a filter' state — Amazon-style default view
    
    Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---
 public/mls.html | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/public/mls.html b/public/mls.html
index a7cd851..ff667c2 100644
--- a/public/mls.html
+++ b/public/mls.html
@@ -310,16 +310,18 @@ function filtered(){
 }
 function render(){
   updateShortBtn();
-  if(!anySelection()){
-    $('#count').textContent=`${DATA.length} loaded · pick a filter or search to view`;
+  // Amazon-style: land POPULATED. Show the whole book on open (paginated to 200 rows in the DOM),
+  // and let the left rail NARROW it. The only empty case is the split-second before data arrives.
+  if(!DATA.length){
+    $('#count').textContent='loading listings…';
     $('#statsbar').innerHTML=''; const _mw=$('#moreWrap'); if(_mw) _mw.innerHTML='';
-    $('#tableView').classList.add('hide'); $('#gridView').classList.remove('hide');
-    $('#gridView').className='grid'; $('#gridView').innerHTML=`<div class="mlsempty">👈 Expand a filter tab or search to begin.<br><span style="font-size:12px">${DATA.length.toLocaleString()} listings loaded — Single-Family + Condo (residential) + Commercial. Pick an <b>Asset class</b> (Single-Family · Condo · CRE types · ◆ Non-QM · ⚑ Unwarrantable), a city, status, a price range, or ⭐ Shortlist.</span></div>`;
     return;
   }
   const rows=filtered(); const cols=visCols();
   renderStats(rows);
-  $('#count').textContent=`${rows.length} of ${DATA.length} properties`;
+  $('#count').textContent = anySelection()
+    ? `${rows.length.toLocaleString()} of ${DATA.length.toLocaleString()} properties`
+    : `${rows.length.toLocaleString()} properties · filter on the left to narrow ↤`;
   // table head (full column set; independent of pagination)
   $('#thead').innerHTML='<tr><th class="starth">⭐</th>'+cols.map(c=>`<th data-k="${c.k}" class="${sortKey===c.k?(sortDir>0?'asc':'desc'):''}">${esc(c.l)}</th>`).join('')+'</tr>';
   _rows=rows; _cols=cols; _shown=Math.min(PAGE(), rows.length);   // paginate the DOM; count+stats use the full set

← e5539e2 auto-save: 2026-07-30T18:50:20 (4 files) — data/condos-redfi  ·  back to Commercialrealestate  ·  mls viewer: default landing sorts newest-first (days-on-mark 70f8f1f →