From 43e2affb94432796fc7e44c5e5fea62901333485 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Mon, 10 Feb 2020 12:58:55 +0800 Subject: [PATCH] Roo/form/ComboNested.js --- Roo/form/ComboNested.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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() { -- 2.39.2