sync
authorAlan Knowles <alan@roojs.com>
Mon, 26 Jul 2021 03:19:55 +0000 (11:19 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 26 Jul 2021 03:19:55 +0000 (11:19 +0800)
Roo/bootstrap/Table.js
docs/json/roodata.json
docs/src/Roo_bootstrap_Table.js.html
docs/symbols/Roo.bootstrap.Table.json
roojs-bootstrap-debug.js
roojs-bootstrap.js

index 776f113..a396806 100644 (file)
@@ -1389,11 +1389,20 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component,  {
             
         }
     },
-    onColumnSplitterMoved : function()
+    onColumnSplitterMoved : function(i, w)
     {
-        // resize it..  
+        this.userResized = true;
         
+        var cm = this.grid.colModel;
         
+        cm.setColumnWidth(i, w, true);
+        var cid = cm.getColumnId(i);
+        this.css.updateRule(this.colSelector + this.idToCssName(cid), "width", (w-this.borderWidth) + "px");
+        this.css.updateRule(this.hdSelector + this.idToCssName(cid), "width", (w-this.borderWidth) + "px");
+        
+        //this.updateSplitters();
+        //this.layout(); << ??
+        this.grid.fireEvent("columnresize", i, w);
     },
     onHeaderChange : function()
     {
index 57f4216..6715c76 100644 (file)
       {
         "name" : "minColumnWidth",
         "type" : "Number",
-        "desc" : "default 10 pixels minimum column width",
+        "desc" : "default 50 pixels minimum column width",
         "memberOf" : ""
       },
       {
index 2457d3f..5d2a491 100644 (file)
@@ -85,7 +85,7 @@ Currently the Table  uses multiple headers to try and handle XL / Medium etc...
  * @cfg {Boolean} lazyLoad  auto load data while scrolling to the end (default false)
  * @cfg {Boolean} auto_hide_footer  auto hide footer if only one page (default false)
  * @cfg {Boolean} enableColumnResize default true if columns can be resized (drag/drop)
- * @cfg {Number} minColumnWidth default 10 pixels minimum column width 
+ * @cfg {Number} minColumnWidth default 50 pixels minimum column width 
  * 
  * @constructor
  * Create a new Table
@@ -264,7 +264,7 @@ Currently the Table  uses multiple headers to try and handle XL / Medium etc...
     </span><span class="jsdoc-var">cellSelection </span><span class="jsdoc-syntax">: </span><span class="jsdoc-keyword">false</span><span class="jsdoc-syntax">,
     </span><span class="jsdoc-var">layout </span><span class="jsdoc-syntax">: </span><span class="jsdoc-keyword">false</span><span class="jsdoc-syntax">,
 
-    </span><span class="jsdoc-var">minColumnWidth </span><span class="jsdoc-syntax">: 10,
+    </span><span class="jsdoc-var">minColumnWidth </span><span class="jsdoc-syntax">: 50,
 
     </span><span class="jsdoc-comment">// Roo.Element - the tbody
     </span><span class="jsdoc-var">bodyEl</span><span class="jsdoc-syntax">: </span><span class="jsdoc-keyword">false</span><span class="jsdoc-syntax">,  </span><span class="jsdoc-comment">// &lt;tbody&gt; Roo.Element - thead element    
index 9f4118a..2775d60 100644 (file)
@@ -85,7 +85,7 @@
     {
       "name" : "minColumnWidth",
       "type" : "Number",
-      "desc" : "default 10 pixels minimum column width",
+      "desc" : "default 50 pixels minimum column width",
       "memberOf" : "Roo.bootstrap.Table",
       "values" : []
     },
index cca2b2c..4916f53 100644 (file)
@@ -8687,7 +8687,7 @@ Currently the Table  uses multiple headers to try and handle XL / Medium etc...
  * @cfg {Boolean} lazyLoad  auto load data while scrolling to the end (default false)
  * @cfg {Boolean} auto_hide_footer  auto hide footer if only one page (default false)
  * @cfg {Boolean} enableColumnResize default true if columns can be resized (drag/drop)
- * @cfg {Number} minColumnWidth default 10 pixels minimum column width 
+ * @cfg {Number} minColumnWidth default 50 pixels minimum column width 
  * 
  * @constructor
  * Create a new Table
@@ -8866,7 +8866,7 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component,  {
     cellSelection : false,
     layout : false,
 
-    minColumnWidth : 10,
+    minColumnWidth : 50,
     
     // Roo.Element - the tbody
     bodyEl: false,  // <tbody> Roo.Element - thead element    
index 623a3ff..68d2891 100644 (file)
@@ -365,7 +365,7 @@ Roo.bootstrap.Table=function(A){Roo.bootstrap.Table.superclass.constructor.call(
 this.headerShow=(typeof(A.thead)!='undefined')?A.thead:this.headerShow;this.footerShow=(typeof(A.tfoot)!='undefined')?A.tfoot:this.footerShow;this.view=this;this.sm=this.sm||{xtype:'RowSelectionModel'};if(this.sm){this.sm.grid=this;this.selModel=Roo.factory(this.sm,Roo.grid);
 this.sm=this.selModel;this.sm.xmodule=this.xmodule||false;}if(this.cm&&typeof(this.cm.config)=='undefined'){this.colModel=new Roo.grid.ColumnModel(this.cm);this.cm=this.colModel;this.cm.xmodule=this.xmodule||false;}if(this.store){this.store=Roo.factory(this.store,Roo.data);
 this.ds=this.store;this.ds.xmodule=this.xmodule||false;}if(this.footer&&this.store){this.footer.dataSource=this.ds;this.footer=Roo.factory(this.footer);}this.addEvents({"cellclick":true,"celldblclick":true,"rowclick":true,"rowdblclick":true,"mouseover":true,"mouseout":true,'rowclass':true,'rowsrendered':true,"contextmenu":true,"rowcontextmenu":true,"cellcontextmenu":true,"headercontextmenu":true,"mousedown":true}
-);};Roo.extend(Roo.bootstrap.Table,Roo.bootstrap.Component,{cls:false,striped:false,scrollBody:false,bordered:false,hover:false,condensed:false,responsive:false,sm:false,cm:false,store:false,loadMask:false,footerShow:true,headerShow:true,enableColumnResize:true,rowSelection:false,cellSelection:false,layout:false,minColumnWidth:10,bodyEl:false,headEl:false,resizeProxy:false,container:false,lazyLoad:false,CSS:Roo.util.CSS,auto_hide_footer:false,view:false,getAutoCreate:function(){var A=Roo.apply({}
+);};Roo.extend(Roo.bootstrap.Table,Roo.bootstrap.Component,{cls:false,striped:false,scrollBody:false,bordered:false,hover:false,condensed:false,responsive:false,sm:false,cm:false,store:false,loadMask:false,footerShow:true,headerShow:true,enableColumnResize:true,rowSelection:false,cellSelection:false,layout:false,minColumnWidth:50,bodyEl:false,headEl:false,resizeProxy:false,container:false,lazyLoad:false,CSS:Roo.util.CSS,auto_hide_footer:false,view:false,getAutoCreate:function(){var A=Roo.apply({}
 ,Roo.bootstrap.Table.superclass.getAutoCreate.call(this));A={tag:'table',cls:'table',cn:[]};if(this.scrollBody){A.cls+=' table-body-fixed';}if(this.striped){A.cls+=' table-striped';}if(this.hover){A.cls+=' table-hover';}if(this.bordered){A.cls+=' table-bordered';
 }if(this.condensed){A.cls+=' table-condensed';}if(this.responsive){A.cls+=' table-responsive';}if(this.cls){A.cls+=' '+this.cls;}if(this.layout){A.style=(typeof(A.style)=='undefined')?('table-layout:'+this.layout+';'):(A.style+('table-layout:'+this.layout+';'));
 }if(this.store||this.cm){if(this.headerShow){A.cn.push(this.renderHeader());}A.cn.push(this.renderBody());if(this.footerShow){A.cn.push(this.renderFooter());}}return {cn:[A]};},initEvents:function(){if(!this.store||!this.cm){return;}if(this.selModel){this.selModel.initEvents();