aboutsummaryrefslogtreecommitdiff
path: root/js/components
diff options
context:
space:
mode:
Diffstat (limited to 'js/components')
-rw-r--r--js/components/combobox.reel/combobox.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/js/components/combobox.reel/combobox.js b/js/components/combobox.reel/combobox.js
index ebbfbffa..3200b01c 100644
--- a/js/components/combobox.reel/combobox.js
+++ b/js/components/combobox.reel/combobox.js
@@ -174,6 +174,22 @@ exports.Combobox = Montage.create(Component, {
174 174
175 prepareForDraw: { 175 prepareForDraw: {
176 value: function() { 176 value: function() {
177 if( (this._value === null) && this._items.length )
178 {
179 var current = this._items[0];
180 if(this.dataFunction)
181 {
182 this.value = this.dataFunction(current);
183 }
184 else if(this.dataField)
185 {
186 this.value = current[this.dataField];
187 }
188 else
189 {
190 this.value = current;
191 }
192 }
177 this.element.addEventListener("change", this, false); 193 this.element.addEventListener("change", this, false);
178 } 194 }
179 } 195 }