- el = me.el;\r
- \r
- Ext.each(me.elements, function(e,i) { \r
- el.dom = e;\r
- return fn.call(scope || el, el, me, i);\r
+ els = me.elements,\r
+ len = els.length,\r
+ i, e;\r
+ \r
+ for(i = 0; i<len; i++) {\r
+ e = els[i];\r
+ if(e){\r
+ e = this.getElement(e);\r
+ if(fn.call(scope || e, e, me, i)){\r
+ break;\r
+ }\r
+ }\r
+ }\r
+ return me;\r
+ },\r
+ \r
+ <div id="method-Ext.CompositeElementLite-fill"></div>/**\r
+ * Clears this Composite and adds the elements passed.\r
+ * @param {Mixed} els Either an array of DOM elements, or another Composite from which to fill this Composite.\r
+ * @return {CompositeElement} this\r
+ */\r
+ fill : function(els){\r
+ var me = this;\r
+ me.elements = [];\r
+ me.add(els);\r
+ return me;\r
+ },\r
+ \r
+ <div id="method-Ext.CompositeElementLite-filter"></div>/**\r
+ * Filters this composite to only elements that match the passed selector.\r
+ * @param {String/Function} selector A string CSS selector or a comparison function.\r
+ * The comparison function will be called with the following arguments:<ul>\r
+ * <li><code>el</code> : Ext.Element<div class="sub-desc">The current DOM element.</div></li>\r
+ * <li><code>index</code> : Number<div class="sub-desc">The current index within the collection.</div></li>\r
+ * </ul>\r
+ * @return {CompositeElement} this\r
+ */\r
+ filter : function(selector){\r
+ var els = [],\r
+ me = this,\r
+ elements = me.elements,\r
+ fn = Ext.isFunction(selector) ? selector\r
+ : function(el){\r
+ return el.is(selector);\r
+ };\r
+ \r
+ \r
+ me.each(function(el, self, i){\r
+ if(fn(el, i) !== false){\r
+ els[els.length] = me.transformElement(el);\r
+ }\r