projects
/
roojs1
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
dad1e7b
)
Roo/form/ComboNested.js
author
Alan Knowles
<alan@roojs.com>
Mon, 10 Feb 2020 07:12:35 +0000
(15:12 +0800)
committer
Alan Knowles
<alan@roojs.com>
Mon, 10 Feb 2020 07:12:35 +0000
(15:12 +0800)
Roo/form/ComboNested.js
patch
|
blob
|
history
diff --git
a/Roo/form/ComboNested.js
b/Roo/form/ComboNested.js
index
cc9114e
..
4c5afb2
100644
(file)
--- a/
Roo/form/ComboNested.js
+++ b/
Roo/form/ComboNested.js
@@
-365,6
+365,11
@@
Roo.extend(Roo.form.ComboNested, Roo.form.ComboBox, {
selectActive : function (lvl)
{
selectActive : function (lvl)
{
+ var cstore = new Roo.data.SimpleStore({
+ //fields : this.store.reader.meta.fields, // we need array reader.. for
+ reader : this.store.reader,
+ data : [ ]
+ });
// just need to determine which of the current level is selected if any..
var value = this.getValue();
var prop = this.hiddenName;
// just need to determine which of the current level is selected if any..
var value = this.getValue();
var prop = this.hiddenName;
@@
-372,22
+377,29
@@
Roo.extend(Roo.form.ComboNested, Roo.form.ComboBox, {
if(store.getCount() < 1){
return;
}
if(store.getCount() < 1){
return;
}
+ var record = false;
store.each(function(r){
store.each(function(r){
+ // selected is at this level
if(r.data[prop] == value){
if(r.data[prop] == value){
- record = r;
- return false;
+ 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 = 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;
+ return true;
});
});
+ if (record !== false) {
+ var ix = store.getIndexOf(record);
+ this.views[lvl].function(ix, false, true); // will not trigger select change..
+ }
}
}