add docblock for password
[roojs1] / Roo / form / GridField.js
index edce692..4f964a7 100644 (file)
@@ -41,7 +41,7 @@ Roo.extend(Roo.form.GridField, Roo.form.Field,  {
      * {tag: "input", type: "checkbox", autocomplete: "off"})
      */
    // defaultAutoCreate : { tag: 'div' },
-    defaultAutoCreate : { tag: 'input', type: 'hidden', autocomplete: 'off'},
+    defaultAutoCreate : { tag: 'input', type: 'hidden', autocomplete: 'new-password'},
     /**
      * @cfg {String} addTitle Text to include for adding a title.
      */
@@ -116,7 +116,9 @@ Roo.extend(Roo.form.GridField, Roo.form.Field,  {
             ds.loadData( data);
         }
         // clear selection so it does not get stale.
-        this.grid.sm.clearSelections();
+        if (this.grid.sm) { 
+            this.grid.sm.clearSelections();
+        }
         
         Roo.form.GridField.superclass.setValue.call(this, v);
         this.refreshValue();