Roo/form/ComboNested.js
authorAlan Knowles <alan@roojs.com>
Thu, 6 Feb 2020 07:44:22 +0000 (15:44 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 6 Feb 2020 07:44:22 +0000 (15:44 +0800)
Roo/form/ComboNested.js

index 1cf2e67..f7c2c70 100644 (file)
@@ -165,16 +165,20 @@ Roo.extend(Roo.form.ComboNested, Roo.form.ComboBox, {
     
     restrictHeight : function()
     {
+        var mh = 0;
         Roo.each(this.innerLists, function(il,i) {
             il.dom.style.height = '';
             var inner = il.dom;
             var h = Math.max(inner.clientHeight, inner.offsetHeight, inner.scrollHeight);
             il.setHeight(h < this.maxHeight ? 'auto' : this.maxHeight);
-            this.lists.beginUpdate();
-            this.lists.setHeight(il.getHeight()+this.lists[i].getFrameWidth('tb')+this.assetHeight);
-            this.lists.alignTo(this.el, this.listAlign);
-            this.lists.endUpdate();
+            mh = Math.Max(il.getHeight(), mh);
         }, this);
+        
+        this.list.beginUpdate();
+        this.list.setHeight(mh+this.lists[i].getFrameWidth('tb')+this.assetHeight);
+        this.list.alignTo(this.el, this.listAlign);
+        this.list.endUpdate();
+        
     },