Fix #6893 - fix roo docs
[roojs1] / Roo / Toolbar.js
index 2edddcb..b59d354 100644 (file)
@@ -52,7 +52,7 @@ Roo.Toolbar.prototype = {
      * @cfg {Array} items
      * array of button configs or elements to add (will be converted to a MixedCollection)
      */
-    
+    items: false,
     /**
      * @cfg {String/HTMLElement/Element} container
      * The id or element that will contain the toolbar
@@ -523,16 +523,15 @@ Roo.Toolbar.Fill = Roo.extend(Roo.Toolbar.Spacer, {
  * A simple class that renders text directly into a toolbar.
  * @constructor
  * Creates a new TextItem
- * @param {String} text
+ * @cfg {string} text 
  */
 Roo.Toolbar.TextItem = function(cfg){
-    var text ="";
+    var  text = cfg || "";
     if (typeof(cfg) == 'object') {
         text = cfg.text || "";
-    } else {
-        text = cfg;
+    }  else {
+        cfg = null;
     }
-     
     var s = document.createElement("span");
     s.className = "ytb-text";
     s.innerHTML = text;