X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=roojs-ui-debug.js;h=1356457aa0698b71abe855f8527e601a85f8eaf6;hb=dad1e7bd00322fecfa995ace623dd4389904f365;hp=abb0bf8c3b21d10614b8d4bc5d60a317a6110c3b;hpb=bb6882939bbac891bdd83fabf1a49d05f99f127c;p=roojs1 diff --git a/roojs-ui-debug.js b/roojs-ui-debug.js index abb0bf8c3b..1356457aa0 100644 --- a/roojs-ui-debug.js +++ b/roojs-ui-debug.js @@ -20558,28 +20558,58 @@ Roo.extend(Roo.form.ComboNested, Roo.form.ComboBox, { }); var _this = this; var record = false; - if(store.getCount() > 0){ - store.each(function(r){ - if(r.data[prop] == value){ - record = r; + if(store.getCount() < 1){ + return false; + } + store.each(function(r){ + if(r.data[prop] == value){ + record = r; + return false; + } + if (r.data.cn && r.data.cn.length) { + cstore.loadDataFromChildren( r); + var cret = _this.findRecordInStore(cstore, prop, value); + if (cret !== false) { + record = cret; return false; } - if (r.data.cn && r.data.cn.length) { - cstore.loadDataFromChildren( r); - var cret = _this.findRecordInStore(cstore, prop, value); - if (cret !== false) { - record = cret; - return false; - } - } - - return true; - }); - } + } + + return true; + }); + return record; }, - function selectActive() + + + selectActive : function (lvl) + { + // just need to determine which of the current level is selected if any.. + var value = this.getValue(); + var prop = this.hiddenName; + var store = this.stores[lvl]; + if(store.getCount() < 1){ + return; + } + store.each(function(r){ + if(r.data[prop] == value){ + record = r; + return false; + } + if (r.data.cn && r.data.cn.length) { + cstore.loadDataFromChildren( r); + var cret = _this.findRecordInStore(cstore, prop, value); + if (cret !== false) { + record = cret; + return false; + } + } + + return true; + }); + + }