Roo/data/Store.js
authoredward <edward@roojs.com>
Thu, 28 Dec 2017 04:05:12 +0000 (12:05 +0800)
committeredward <edward@roojs.com>
Thu, 28 Dec 2017 04:05:12 +0000 (12:05 +0800)
Roo/data/Store.js

index 69f0add..9a04cbc 100644 (file)
@@ -421,7 +421,16 @@ Roo.extend(Roo.data.Store, Roo.util.Observable, {
             this.add(r);
         }
         
-        Roo.log(this.parent);
+        if(this.parent && this.parent.emptyTitle.length) {
+                
+            var e = new Roo.data.Record({});
+
+            e.set(this.parent.displayField, this.parent.emptyTitle);
+            e.set(this.parent.valueField, '');
+
+            this.insert(0, e);
+        }
+            
         this.fireEvent("load", this, r, options, o);
         if(options.callback){
             options.callback.call(options.scope || this, r, options, true);