From: Alan Knowles Date: Mon, 10 Feb 2020 04:58:55 +0000 (+0800) Subject: Roo/form/ComboNested.js X-Git-Url: http://git.roojs.org/?p=roojs1;a=commitdiff_plain;h=43e2affb94432796fc7e44c5e5fea62901333485 Roo/form/ComboNested.js --- diff --git a/Roo/form/ComboNested.js b/Roo/form/ComboNested.js index da1f0f1e91..b51ed313a9 100644 --- a/Roo/form/ComboNested.js +++ b/Roo/form/ComboNested.js @@ -295,11 +295,12 @@ Roo.extend(Roo.form.ComboNested, Roo.form.ComboBox, { ((this.listWidth * 3 || Math.max(this.wrap.getWidth(), this.minListWidth)) - this.list.getFrameWidth('lr')) / 3 ); var data = typeof(rec.data.cn) == 'undefined' ? [] : rec.data.cn; + var dl = typeof(data.data.cn) ? data.data.total : data.length; ///json is a nested response.. this.stores[opts.list+1].loadData( data ); this.views[opts.list+1].getEl().setHeight( this.innerLists[0].getHeight()); - this.views[opts.list+1].getEl().setStyle({ display : data .length ? 'block' : 'none' }); + this.views[opts.list+1].getEl().setStyle({ display : dl ? 'block' : 'none' }); this.innerLists[opts.list+1].setHeight( this.innerLists[0].getHeight()); - this.list.setWidth(lw * (opts.list + (data.length ? 2 : 1))); + this.list.setWidth(lw * (opts.list + (dl ? 2 : 1))); }, onDoubleClick : function() {