[object Object]

← back to Rentv Sheet Enrich Refine

Fix width-weird-on-click: table width = exact sum of column widths (absolute, no proportional re-scaling); resize re-renders once on release. Verified stable across sort/filter/view clicks via click-through

2c2d33c4237ab1ed2d12c5fb7c9cabd95ad8d6f5 · 2026-08-13 14:56:29 -0700 · Steve Abrams

Files touched

Diff

commit 2c2d33c4237ab1ed2d12c5fb7c9cabd95ad8d6f5
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Thu Aug 13 14:56:29 2026 -0700

    Fix width-weird-on-click: table width = exact sum of column widths (absolute, no proportional re-scaling); resize re-renders once on release. Verified stable across sort/filter/view clicks via click-through
---
 public_live/index.html | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/public_live/index.html b/public_live/index.html
index 5124a9d..14209d2 100644
--- a/public_live/index.html
+++ b/public_live/index.html
@@ -332,7 +332,8 @@ function render(){
 function tableHTML(rows){
   const cols=visCols();
   const cg='<colgroup><col style="width:44px">'+cols.map(c=>`<col style="width:${(COLW[c.i]||180)}px">`).join('')+'</colgroup>';
-  let h='<table id="grid">'+cg+'<thead><tr><th></th>'+cols.map(c=>`<th data-c="${c.i}" title="drag to move · drag right edge to resize · dbl-click edge to autofit">${esc(c.h)}${SORT&&SORT.col===c.i?(SORT.dir<0?' ▼':' ▲'):''}<span class="rz" data-c="${c.i}"></span></th>`).join('')+'</tr></thead><tbody>';
+  const totalW=44+cols.reduce((s,c)=>s+(COLW[c.i]||180),0);   // absolute widths -> columns don't re-proportion on render
+  let h='<table id="grid" style="width:'+totalW+'px">'+cg+'<thead><tr><th></th>'+cols.map(c=>`<th data-c="${c.i}" title="drag to move · drag right edge to resize · dbl-click edge to autofit">${esc(c.h)}${SORT&&SORT.col===c.i?(SORT.dir<0?' ▼':' ▲'):''}<span class="rz" data-c="${c.i}"></span></th>`).join('')+'</tr></thead><tbody>';
   let lastG=null;
   for(const [r,ri] of rows){
     if(GROUP!==''){ const gv=g(r,+GROUP)||'(blank)'; if(gv!==lastG){ lastG=gv; h+=`<tr class="grouphdr"><td colspan="${cols.length+1}">${esc(gv)}</td></tr>`; } }
@@ -395,7 +396,7 @@ function wireGrid(){
     const mv=ev=>{ newW=Math.max(60,startW+(ev.clientX-startX)); guide.style.left=(startX+(newW-startW))+'px'; };
     const up=()=>{ document.removeEventListener('mousemove',mv);document.removeEventListener('mouseup',up);
       guide.remove(); document.body.classList.remove('resizing');
-      col.style.width=Math.round(newW)+'px'; COLW[ci]=Math.round(newW); LS.set('colw.'+GID,COLW); };
+      COLW[ci]=Math.round(newW); LS.set('colw.'+GID,COLW); render(); };  // full re-render = exact width, no re-proportioning
     document.addEventListener('mousemove',mv);document.addEventListener('mouseup',up);
   }));
   // double-click a resize handle to auto-fit the column to its content

← 10ea773 Smooth column resize: drag a guide line (no per-frame 2500-r  ·  back to Rentv Sheet Enrich Refine  ·  Remove jumpy 'Wider' bulk button (bumped all cols +60 -> lur a8e0412 →