projects
/
roojs1
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
dc5d938
)
allow string based values for comboboxarray
author
Alan Knowles
<alan@roojs.com>
Wed, 13 May 2020 08:42:15 +0000
(16:42 +0800)
committer
Alan Knowles
<alan@roojs.com>
Wed, 13 May 2020 08:42:15 +0000
(16:42 +0800)
Roo/form/ComboBoxArray.js
patch
|
blob
|
history
diff --git
a/Roo/form/ComboBoxArray.js
b/Roo/form/ComboBoxArray.js
index
68af07b
..
75ce301
100644
(file)
--- a/
Roo/form/ComboBoxArray.js
+++ b/
Roo/form/ComboBoxArray.js
@@
-321,7
+321,13
@@
Roo.extend(Roo.form.ComboBoxArray, Roo.form.TextField,
if (typeof(v) == 'object' ) {
// then let's assume it's an array of objects..
Roo.each(v, function(l) {
if (typeof(v) == 'object' ) {
// then let's assume it's an array of objects..
Roo.each(v, function(l) {
- this.addItem(l);
+ var add = l;
+ if (typeof(l) == 'string') {
+ add = {};
+ add[this.valueField] = k;
+ add[this.displayField] = k
+ }
+ this.addItem(add);
}, this);
}
}, this);
}