You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1372 lines
59 KiB

2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>The source code</title>
  6. <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
  7. <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
  8. <style type="text/css">
  9. .highlight { display: block; background-color: #ddd; }
  10. </style>
  11. <script type="text/javascript">
  12. function highlight() {
  13. document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
  14. }
  15. </script>
  16. </head>
  17. <body onload="prettyPrint(); highlight();">
  18. <pre class="prettyprint lang-js"><span id='Ext-form-ComboBox-method-constructor'><span id='Ext-form-ComboBox'>/**
  19. </span></span> * @class Ext.form.ComboBox
  20. * @extends Ext.form.TriggerField
  21. * &lt;p&gt;A combobox control with support for autocomplete, remote-loading, paging and many other features.&lt;/p&gt;
  22. * &lt;p&gt;A ComboBox works in a similar manner to a traditional HTML &amp;lt;select&gt; field. The difference is
  23. * that to submit the {@link #valueField}, you must specify a {@link #hiddenName} to create a hidden input
  24. * field to hold the value of the valueField. The &lt;i&gt;{@link #displayField}&lt;/i&gt; is shown in the text field
  25. * which is named according to the {@link #name}.&lt;/p&gt;
  26. * &lt;p&gt;&lt;b&gt;&lt;u&gt;Events&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;
  27. * &lt;p&gt;To do something when something in ComboBox is selected, configure the select event:&lt;pre&gt;&lt;code&gt;
  28. var cb = new Ext.form.ComboBox({
  29. // all of your config options
  30. listeners:{
  31. scope: yourScope,
  32. 'select': yourFunction
  33. }
  34. });
  35. // Alternatively, you can assign events after the object is created:
  36. var cb = new Ext.form.ComboBox(yourOptions);
  37. cb.on('select', yourFunction, yourScope);
  38. * &lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;
  39. *
  40. * &lt;p&gt;&lt;b&gt;&lt;u&gt;ComboBox in Grid&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;
  41. * &lt;p&gt;If using a ComboBox in an {@link Ext.grid.EditorGridPanel Editor Grid} a {@link Ext.grid.Column#renderer renderer}
  42. * will be needed to show the displayField when the editor is not active. Set up the renderer manually, or implement
  43. * a reusable render, for example:&lt;pre&gt;&lt;code&gt;
  44. // create reusable renderer
  45. Ext.util.Format.comboRenderer = function(combo){
  46. return function(value){
  47. var record = combo.findRecord(combo.{@link #valueField}, value);
  48. return record ? record.get(combo.{@link #displayField}) : combo.{@link #valueNotFoundText};
  49. }
  50. }
  51. // create the combo instance
  52. var combo = new Ext.form.ComboBox({
  53. {@link #typeAhead}: true,
  54. {@link #triggerAction}: 'all',
  55. {@link #lazyRender}:true,
  56. {@link #mode}: 'local',
  57. {@link #store}: new Ext.data.ArrayStore({
  58. id: 0,
  59. fields: [
  60. 'myId',
  61. 'displayText'
  62. ],
  63. data: [[1, 'item1'], [2, 'item2']]
  64. }),
  65. {@link #valueField}: 'myId',
  66. {@link #displayField}: 'displayText'
  67. });
  68. // snippet of column model used within grid
  69. var cm = new Ext.grid.ColumnModel([{
  70. ...
  71. },{
  72. header: &quot;Some Header&quot;,
  73. dataIndex: 'whatever',
  74. width: 130,
  75. editor: combo, // specify reference to combo instance
  76. renderer: Ext.util.Format.comboRenderer(combo) // pass combo instance to reusable renderer
  77. },
  78. ...
  79. ]);
  80. * &lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;
  81. *
  82. * &lt;p&gt;&lt;b&gt;&lt;u&gt;Filtering&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;
  83. * &lt;p&gt;A ComboBox {@link #doQuery uses filtering itself}, for information about filtering the ComboBox
  84. * store manually see &lt;tt&gt;{@link #lastQuery}&lt;/tt&gt;.&lt;/p&gt;
  85. * @constructor
  86. * Create a new ComboBox.
  87. * @param {Object} config Configuration options
  88. * @xtype combo
  89. */
  90. Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, {
  91. <span id='Ext-form-ComboBox-cfg-transform'> /**
  92. </span> * @cfg {Mixed} transform The id, DOM node or element of an existing HTML SELECT to convert to a ComboBox.
  93. * Note that if you specify this and the combo is going to be in an {@link Ext.form.BasicForm} or
  94. * {@link Ext.form.FormPanel}, you must also set &lt;tt&gt;{@link #lazyRender} = true&lt;/tt&gt;.
  95. */
  96. <span id='Ext-form-ComboBox-cfg-lazyRender'> /**
  97. </span> * @cfg {Boolean} lazyRender &lt;tt&gt;true&lt;/tt&gt; to prevent the ComboBox from rendering until requested
  98. * (should always be used when rendering into an {@link Ext.Editor} (e.g. {@link Ext.grid.EditorGridPanel Grids}),
  99. * defaults to &lt;tt&gt;false&lt;/tt&gt;).
  100. */
  101. <span id='Ext-form-ComboBox-cfg-autoCreate'> /**
  102. </span> * @cfg {String/Object} autoCreate &lt;p&gt;A {@link Ext.DomHelper DomHelper} element spec, or &lt;tt&gt;true&lt;/tt&gt; for a default
  103. * element spec. Used to create the {@link Ext.Component#getEl Element} which will encapsulate this Component.
  104. * See &lt;tt&gt;{@link Ext.Component#autoEl autoEl}&lt;/tt&gt; for details. Defaults to:&lt;/p&gt;
  105. * &lt;pre&gt;&lt;code&gt;{tag: &quot;input&quot;, type: &quot;text&quot;, size: &quot;24&quot;, autocomplete: &quot;off&quot;}&lt;/code&gt;&lt;/pre&gt;
  106. */
  107. <span id='Ext-form-ComboBox-cfg-store'> /**
  108. </span> * @cfg {Ext.data.Store/Array} store The data source to which this combo is bound (defaults to &lt;tt&gt;undefined&lt;/tt&gt;).
  109. * Acceptable values for this property are:
  110. * &lt;div class=&quot;mdetail-params&quot;&gt;&lt;ul&gt;
  111. * &lt;li&gt;&lt;b&gt;any {@link Ext.data.Store Store} subclass&lt;/b&gt;&lt;/li&gt;
  112. * &lt;li&gt;&lt;b&gt;an Array&lt;/b&gt; : Arrays will be converted to a {@link Ext.data.ArrayStore} internally,
  113. * automatically generating {@link Ext.data.Field#name field names} to work with all data components.
  114. * &lt;div class=&quot;mdetail-params&quot;&gt;&lt;ul&gt;
  115. * &lt;li&gt;&lt;b&gt;1-dimensional array&lt;/b&gt; : (e.g., &lt;tt&gt;['Foo','Bar']&lt;/tt&gt;)&lt;div class=&quot;sub-desc&quot;&gt;
  116. * A 1-dimensional array will automatically be expanded (each array item will be used for both the combo
  117. * {@link #valueField} and {@link #displayField})&lt;/div&gt;&lt;/li&gt;
  118. * &lt;li&gt;&lt;b&gt;2-dimensional array&lt;/b&gt; : (e.g., &lt;tt&gt;[['f','Foo'],['b','Bar']]&lt;/tt&gt;)&lt;div class=&quot;sub-desc&quot;&gt;
  119. * For a multi-dimensional array, the value in index 0 of each item will be assumed to be the combo
  120. * {@link #valueField}, while the value at index 1 is assumed to be the combo {@link #displayField}.
  121. * &lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;
  122. * &lt;p&gt;See also &lt;tt&gt;{@link #mode}&lt;/tt&gt;.&lt;/p&gt;
  123. */
  124. <span id='Ext-form-ComboBox-cfg-title'> /**
  125. </span> * @cfg {String} title If supplied, a header element is created containing this text and added into the top of
  126. * the dropdown list (defaults to undefined, with no header element)
  127. */
  128. <span id='Ext-form-ComboBox-property-defaultAutoCreate'> // private
  129. </span> defaultAutoCreate : {tag: &quot;input&quot;, type: &quot;text&quot;, size: &quot;24&quot;, autocomplete: &quot;off&quot;},
  130. <span id='Ext-form-ComboBox-cfg-listWidth'> /**
  131. </span> * @cfg {Number} listWidth The width (used as a parameter to {@link Ext.Element#setWidth}) of the dropdown
  132. * list (defaults to the width of the ComboBox field). See also &lt;tt&gt;{@link #minListWidth}&lt;/tt&gt;
  133. */
  134. <span id='Ext-form-ComboBox-cfg-displayField'> /**
  135. </span> * @cfg {String} displayField The underlying {@link Ext.data.Field#name data field name} to bind to this
  136. * ComboBox (defaults to undefined if &lt;tt&gt;{@link #mode} = 'remote'&lt;/tt&gt; or &lt;tt&gt;'field1'&lt;/tt&gt; if
  137. * {@link #transform transforming a select} or if the {@link #store field name is autogenerated based on
  138. * the store configuration}).
  139. * &lt;p&gt;See also &lt;tt&gt;{@link #valueField}&lt;/tt&gt;.&lt;/p&gt;
  140. * &lt;p&gt;&lt;b&gt;Note&lt;/b&gt;: if using a ComboBox in an {@link Ext.grid.EditorGridPanel Editor Grid} a
  141. * {@link Ext.grid.Column#renderer renderer} will be needed to show the displayField when the editor is not
  142. * active.&lt;/p&gt;
  143. */
  144. <span id='Ext-form-ComboBox-cfg-valueField'> /**
  145. </span> * @cfg {String} valueField The underlying {@link Ext.data.Field#name data value name} to bind to this
  146. * ComboBox (defaults to undefined if &lt;tt&gt;{@link #mode} = 'remote'&lt;/tt&gt; or &lt;tt&gt;'field2'&lt;/tt&gt; if
  147. * {@link #transform transforming a select} or if the {@link #store field name is autogenerated based on
  148. * the store configuration}).
  149. * &lt;p&gt;&lt;b&gt;Note&lt;/b&gt;: use of a &lt;tt&gt;valueField&lt;/tt&gt; requires the user to make a selection in order for a value to be
  150. * mapped. See also &lt;tt&gt;{@link #hiddenName}&lt;/tt&gt;, &lt;tt&gt;{@link #hiddenValue}&lt;/tt&gt;, and &lt;tt&gt;{@link #displayField}&lt;/tt&gt;.&lt;/p&gt;
  151. */
  152. <span id='Ext-form-ComboBox-cfg-hiddenName'> /**
  153. </span> * @cfg {String} hiddenName If specified, a hidden form field with this name is dynamically generated to store the
  154. * field's data value (defaults to the underlying DOM element's name). Required for the combo's value to automatically
  155. * post during a form submission. See also {@link #valueField}.
  156. */
  157. <span id='Ext-form-ComboBox-cfg-hiddenId'> /**
  158. </span> * @cfg {String} hiddenId If &lt;tt&gt;{@link #hiddenName}&lt;/tt&gt; is specified, &lt;tt&gt;hiddenId&lt;/tt&gt; can also be provided
  159. * to give the hidden field a unique id. The &lt;tt&gt;hiddenId&lt;/tt&gt; and combo {@link Ext.Component#id id} should be
  160. * different, since no two DOM nodes should share the same id.
  161. */
  162. <span id='Ext-form-ComboBox-cfg-hiddenValue'> /**
  163. </span> * @cfg {String} hiddenValue Sets the initial value of the hidden field if {@link #hiddenName} is
  164. * specified to contain the selected {@link #valueField}, from the Store. Defaults to the configured
  165. * &lt;tt&gt;{@link Ext.form.Field#value value}&lt;/tt&gt;.
  166. */
  167. <span id='Ext-form-ComboBox-cfg-listClass'> /**
  168. </span> * @cfg {String} listClass The CSS class to add to the predefined &lt;tt&gt;'x-combo-list'&lt;/tt&gt; class
  169. * applied the dropdown list element (defaults to '').
  170. */
  171. listClass : '',
  172. <span id='Ext-form-ComboBox-cfg-selectedClass'> /**
  173. </span> * @cfg {String} selectedClass CSS class to apply to the selected item in the dropdown list
  174. * (defaults to &lt;tt&gt;'x-combo-selected'&lt;/tt&gt;)
  175. */
  176. selectedClass : 'x-combo-selected',
  177. <span id='Ext-form-ComboBox-cfg-listEmptyText'> /**
  178. </span> * @cfg {String} listEmptyText The empty text to display in the data view if no items are found.
  179. * (defaults to '')
  180. */
  181. listEmptyText: '',
  182. <span id='Ext-form-ComboBox-cfg-triggerClass'> /**
  183. </span> * @cfg {String} triggerClass An additional CSS class used to style the trigger button. The trigger will always
  184. * get the class &lt;tt&gt;'x-form-trigger'&lt;/tt&gt; and &lt;tt&gt;triggerClass&lt;/tt&gt; will be &lt;b&gt;appended&lt;/b&gt; if specified
  185. * (defaults to &lt;tt&gt;'x-form-arrow-trigger'&lt;/tt&gt; which displays a downward arrow icon).
  186. */
  187. triggerClass : 'x-form-arrow-trigger',
  188. <span id='Ext-form-ComboBox-cfg-shadow'> /**
  189. </span> * @cfg {Boolean/String} shadow &lt;tt&gt;true&lt;/tt&gt; or &lt;tt&gt;&quot;sides&quot;&lt;/tt&gt; for the default effect, &lt;tt&gt;&quot;frame&quot;&lt;/tt&gt; for
  190. * 4-way shadow, and &lt;tt&gt;&quot;drop&quot;&lt;/tt&gt; for bottom-right
  191. */
  192. shadow : 'sides',
  193. <span id='Ext-form-ComboBox-cfg-listAlign'> /**
  194. </span> * @cfg {String/Array} listAlign A valid anchor position value. See &lt;tt&gt;{@link Ext.Element#alignTo}&lt;/tt&gt; for details
  195. * on supported anchor positions and offsets. To specify x/y offsets as well, this value
  196. * may be specified as an Array of &lt;tt&gt;{@link Ext.Element#alignTo}&lt;/tt&gt; method arguments.&lt;/p&gt;
  197. * &lt;pre&gt;&lt;code&gt;[ 'tl-bl?', [6,0] ]&lt;/code&gt;&lt;/pre&gt;(defaults to &lt;tt&gt;'tl-bl?'&lt;/tt&gt;)
  198. */
  199. listAlign : 'tl-bl?',
  200. <span id='Ext-form-ComboBox-cfg-maxHeight'> /**
  201. </span> * @cfg {Number} maxHeight The maximum height in pixels of the dropdown list before scrollbars are shown
  202. * (defaults to &lt;tt&gt;300&lt;/tt&gt;)
  203. */
  204. maxHeight : 300,
  205. <span id='Ext-form-ComboBox-cfg-minHeight'> /**
  206. </span> * @cfg {Number} minHeight The minimum height in pixels of the dropdown list when the list is constrained by its
  207. * distance to the viewport edges (defaults to &lt;tt&gt;90&lt;/tt&gt;)
  208. */
  209. minHeight : 90,
  210. <span id='Ext-form-ComboBox-cfg-triggerAction'> /**
  211. </span> * @cfg {String} triggerAction The action to execute when the trigger is clicked.
  212. * &lt;div class=&quot;mdetail-params&quot;&gt;&lt;ul&gt;
  213. * &lt;li&gt;&lt;b&gt;&lt;tt&gt;'query'&lt;/tt&gt;&lt;/b&gt; : &lt;b&gt;Default&lt;/b&gt;
  214. * &lt;p class=&quot;sub-desc&quot;&gt;{@link #doQuery run the query} using the {@link Ext.form.Field#getRawValue raw value}.&lt;/p&gt;&lt;/li&gt;
  215. * &lt;li&gt;&lt;b&gt;&lt;tt&gt;'all'&lt;/tt&gt;&lt;/b&gt; :
  216. * &lt;p class=&quot;sub-desc&quot;&gt;{@link #doQuery run the query} specified by the &lt;tt&gt;{@link #allQuery}&lt;/tt&gt; config option&lt;/p&gt;&lt;/li&gt;
  217. * &lt;/ul&gt;&lt;/div&gt;
  218. * &lt;p&gt;See also &lt;code&gt;{@link #queryParam}&lt;/code&gt;.&lt;/p&gt;
  219. */
  220. triggerAction : 'query',
  221. <span id='Ext-form-ComboBox-cfg-minChars'> /**
  222. </span> * @cfg {Number} minChars The minimum number of characters the user must type before autocomplete and
  223. * {@link #typeAhead} activate (defaults to &lt;tt&gt;4&lt;/tt&gt; if &lt;tt&gt;{@link #mode} = 'remote'&lt;/tt&gt; or &lt;tt&gt;0&lt;/tt&gt; if
  224. * &lt;tt&gt;{@link #mode} = 'local'&lt;/tt&gt;, does not apply if
  225. * &lt;tt&gt;{@link Ext.form.TriggerField#editable editable} = false&lt;/tt&gt;).
  226. */
  227. minChars : 4,
  228. <span id='Ext-form-ComboBox-cfg-autoSelect'> /**
  229. </span> * @cfg {Boolean} autoSelect &lt;tt&gt;true&lt;/tt&gt; to select the first result gathered by the data store (defaults
  230. * to &lt;tt&gt;true&lt;/tt&gt;). A false value would require a manual selection from the dropdown list to set the components value
  231. * unless the value of ({@link #typeAheadDelay}) were true.
  232. */
  233. autoSelect : true,
  234. <span id='Ext-form-ComboBox-cfg-typeAhead'> /**
  235. </span> * @cfg {Boolean} typeAhead &lt;tt&gt;true&lt;/tt&gt; to populate and autoselect the remainder of the text being
  236. * typed after a configurable delay ({@link #typeAheadDelay}) if it matches a known value (defaults
  237. * to &lt;tt&gt;false&lt;/tt&gt;)
  238. */
  239. typeAhead : false,
  240. <span id='Ext-form-ComboBox-cfg-queryDelay'> /**
  241. </span> * @cfg {Number} queryDelay The length of time in milliseconds to delay between the start of typing and
  242. * sending the query to filter the dropdown list (defaults to &lt;tt&gt;500&lt;/tt&gt; if &lt;tt&gt;{@link #mode} = 'remote'&lt;/tt&gt;
  243. * or &lt;tt&gt;10&lt;/tt&gt; if &lt;tt&gt;{@link #mode} = 'local'&lt;/tt&gt;)
  244. */
  245. queryDelay : 500,
  246. <span id='Ext-form-ComboBox-cfg-pageSize'> /**
  247. </span> * @cfg {Number} pageSize If greater than &lt;tt&gt;0&lt;/tt&gt;, a {@link Ext.PagingToolbar} is displayed in the
  248. * footer of the dropdown list and the {@link #doQuery filter queries} will execute with page start and
  249. * {@link Ext.PagingToolbar#pageSize limit} parameters. Only applies when &lt;tt&gt;{@link #mode} = 'remote'&lt;/tt&gt;
  250. * (defaults to &lt;tt&gt;0&lt;/tt&gt;).
  251. */
  252. pageSize : 0,
  253. <span id='Ext-form-ComboBox-cfg-selectOnFocus'> /**
  254. </span> * @cfg {Boolean} selectOnFocus &lt;tt&gt;true&lt;/tt&gt; to select any existing text in the field immediately on focus.
  255. * Only applies when &lt;tt&gt;{@link Ext.form.TriggerField#editable editable} = true&lt;/tt&gt; (defaults to
  256. * &lt;tt&gt;false&lt;/tt&gt;).
  257. */
  258. selectOnFocus : false,
  259. <span id='Ext-form-ComboBox-cfg-queryParam'> /**
  260. </span> * @cfg {String} queryParam Name of the query ({@link Ext.data.Store#baseParam baseParam} name for the store)
  261. * as it will be passed on the querystring (defaults to &lt;tt&gt;'query'&lt;/tt&gt;)
  262. */
  263. queryParam : 'query',
  264. <span id='Ext-form-ComboBox-cfg-loadingText'> /**
  265. </span> * @cfg {String} loadingText The text to display in the dropdown list while data is loading. Only applies
  266. * when &lt;tt&gt;{@link #mode} = 'remote'&lt;/tt&gt; (defaults to &lt;tt&gt;'Loading...'&lt;/tt&gt;)
  267. */
  268. loadingText : 'Loading...',
  269. <span id='Ext-form-ComboBox-cfg-resizable'> /**
  270. </span> * @cfg {Boolean} resizable &lt;tt&gt;true&lt;/tt&gt; to add a resize handle to the bottom of the dropdown list
  271. * (creates an {@link Ext.Resizable} with 'se' {@link Ext.Resizable#pinned pinned} handles).
  272. * Defaults to &lt;tt&gt;false&lt;/tt&gt;.
  273. */
  274. resizable : false,
  275. <span id='Ext-form-ComboBox-cfg-handleHeight'> /**
  276. </span> * @cfg {Number} handleHeight The height in pixels of the dropdown list resize handle if
  277. * &lt;tt&gt;{@link #resizable} = true&lt;/tt&gt; (defaults to &lt;tt&gt;8&lt;/tt&gt;)
  278. */
  279. handleHeight : 8,
  280. <span id='Ext-form-ComboBox-cfg-allQuery'> /**
  281. </span> * @cfg {String} allQuery The text query to send to the server to return all records for the list
  282. * with no filtering (defaults to '')
  283. */
  284. allQuery: '',
  285. <span id='Ext-form-ComboBox-cfg-mode'> /**
  286. </span> * @cfg {String} mode Acceptable values are:
  287. * &lt;div class=&quot;mdetail-params&quot;&gt;&lt;ul&gt;
  288. * &lt;li&gt;&lt;b&gt;&lt;tt&gt;'remote'&lt;/tt&gt;&lt;/b&gt; : &lt;b&gt;Default&lt;/b&gt;
  289. * &lt;p class=&quot;sub-desc&quot;&gt;Automatically loads the &lt;tt&gt;{@link #store}&lt;/tt&gt; the &lt;b&gt;first&lt;/b&gt; time the trigger
  290. * is clicked. If you do not want the store to be automatically loaded the first time the trigger is
  291. * clicked, set to &lt;tt&gt;'local'&lt;/tt&gt; and manually load the store. To force a requery of the store
  292. * &lt;b&gt;every&lt;/b&gt; time the trigger is clicked see &lt;tt&gt;{@link #lastQuery}&lt;/tt&gt;.&lt;/p&gt;&lt;/li&gt;
  293. * &lt;li&gt;&lt;b&gt;&lt;tt&gt;'local'&lt;/tt&gt;&lt;/b&gt; :
  294. * &lt;p class=&quot;sub-desc&quot;&gt;ComboBox loads local data&lt;/p&gt;
  295. * &lt;pre&gt;&lt;code&gt;
  296. var combo = new Ext.form.ComboBox({
  297. renderTo: document.body,
  298. mode: 'local',
  299. store: new Ext.data.ArrayStore({
  300. id: 0,
  301. fields: [
  302. 'myId', // numeric value is the key
  303. 'displayText'
  304. ],
  305. data: [[1, 'item1'], [2, 'item2']] // data is local
  306. }),
  307. valueField: 'myId',
  308. displayField: 'displayText',
  309. triggerAction: 'all'
  310. });
  311. * &lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
  312. * &lt;/ul&gt;&lt;/div&gt;
  313. */
  314. mode: 'remote',
  315. <span id='Ext-form-ComboBox-cfg-minListWidth'> /**
  316. </span> * @cfg {Number} minListWidth The minimum width of the dropdown list in pixels (defaults to &lt;tt&gt;70&lt;/tt&gt;, will
  317. * be ignored if &lt;tt&gt;{@link #listWidth}&lt;/tt&gt; has a higher value)
  318. */
  319. minListWidth : 70,
  320. <span id='Ext-form-ComboBox-cfg-forceSelection'> /**
  321. </span> * @cfg {Boolean} forceSelection &lt;tt&gt;true&lt;/tt&gt; to restrict the selected value to one of the values in the list,
  322. * &lt;tt&gt;false&lt;/tt&gt; to allow the user to set arbitrary text into the field (defaults to &lt;tt&gt;false&lt;/tt&gt;)
  323. */
  324. forceSelection : false,
  325. <span id='Ext-form-ComboBox-cfg-typeAheadDelay'> /**
  326. </span> * @cfg {Number} typeAheadDelay The length of time in milliseconds to wait until the typeahead text is displayed
  327. * if &lt;tt&gt;{@link #typeAhead} = true&lt;/tt&gt; (defaults to &lt;tt&gt;250&lt;/tt&gt;)
  328. */
  329. typeAheadDelay : 250,
  330. <span id='Ext-form-ComboBox-cfg-valueNotFoundText'> /**
  331. </span> * @cfg {String} valueNotFoundText When using a name/value combo, if the value passed to setValue is not found in
  332. * the store, valueNotFoundText will be displayed as the field text if defined (defaults to undefined). If this
  333. * default text is used, it means there is no value set and no validation will occur on this field.
  334. */
  335. <span id='Ext-form-ComboBox-cfg-lazyInit'> /**
  336. </span> * @cfg {Boolean} lazyInit &lt;tt&gt;true&lt;/tt&gt; to not initialize the list for this combo until the field is focused
  337. * (defaults to &lt;tt&gt;true&lt;/tt&gt;)
  338. */
  339. lazyInit : true,
  340. <span id='Ext-form-ComboBox-cfg-clearFilterOnReset'> /**
  341. </span> * @cfg {Boolean} clearFilterOnReset &lt;tt&gt;true&lt;/tt&gt; to clear any filters on the store (when in local mode) when reset is called
  342. * (defaults to &lt;tt&gt;true&lt;/tt&gt;)
  343. */
  344. clearFilterOnReset : true,
  345. <span id='Ext-form-ComboBox-cfg-submitValue'> /**
  346. </span> * @cfg {Boolean} submitValue False to clear the name attribute on the field so that it is not submitted during a form post.
  347. * If a hiddenName is specified, setting this to true will cause both the hidden field and the element to be submitted.
  348. * Defaults to &lt;tt&gt;undefined&lt;/tt&gt;.
  349. */
  350. submitValue: undefined,
  351. <span id='Ext-form-ComboBox-property-lastQuery'> /**
  352. </span> * The value of the match string used to filter the store. Delete this property to force a requery.
  353. * Example use:
  354. * &lt;pre&gt;&lt;code&gt;
  355. var combo = new Ext.form.ComboBox({
  356. ...
  357. mode: 'remote',
  358. ...
  359. listeners: {
  360. // delete the previous query in the beforequery event or set
  361. // combo.lastQuery = null (this will reload the store the next time it expands)
  362. beforequery: function(qe){
  363. delete qe.combo.lastQuery;
  364. }
  365. }
  366. });
  367. * &lt;/code&gt;&lt;/pre&gt;
  368. * To make sure the filter in the store is not cleared the first time the ComboBox trigger is used
  369. * configure the combo with &lt;tt&gt;lastQuery=''&lt;/tt&gt;. Example use:
  370. * &lt;pre&gt;&lt;code&gt;
  371. var combo = new Ext.form.ComboBox({
  372. ...
  373. mode: 'local',
  374. triggerAction: 'all',
  375. lastQuery: ''
  376. });
  377. * &lt;/code&gt;&lt;/pre&gt;
  378. * @property lastQuery
  379. * @type String
  380. */
  381. <span id='Ext-form-ComboBox-method-initComponent'> // private
  382. </span> initComponent : function(){
  383. Ext.form.ComboBox.superclass.initComponent.call(this);
  384. this.addEvents(
  385. <span id='Ext-form-ComboBox-event-expand'> /**
  386. </span> * @event expand
  387. * Fires when the dropdown list is expanded
  388. * @param {Ext.form.ComboBox} combo This combo box
  389. */
  390. 'expand',
  391. <span id='Ext-form-ComboBox-event-collapse'> /**
  392. </span> * @event collapse
  393. * Fires when the dropdown list is collapsed
  394. * @param {Ext.form.ComboBox} combo This combo box
  395. */
  396. 'collapse',
  397. <span id='Ext-form-ComboBox-event-beforeselect'> /**
  398. </span> * @event beforeselect
  399. * Fires before a list item is selected. Return false to cancel the selection.
  400. * @param {Ext.form.ComboBox} combo This combo box
  401. * @param {Ext.data.Record} record The data record returned from the underlying store
  402. * @param {Number} index The index of the selected item in the dropdown list
  403. */
  404. 'beforeselect',
  405. <span id='Ext-form-ComboBox-event-select'> /**
  406. </span> * @event select
  407. * Fires when a list item is selected
  408. * @param {Ext.form.ComboBox} combo This combo box
  409. * @param {Ext.data.Record} record The data record returned from the underlying store
  410. * @param {Number} index The index of the selected item in the dropdown list
  411. */
  412. 'select',
  413. <span id='Ext-form-ComboBox-event-beforequery'> /**
  414. </span> * @event beforequery
  415. * Fires before all queries are processed. Return false to cancel the query or set the queryEvent's
  416. * cancel property to true.
  417. * @param {Object} queryEvent An object that has these properties:&lt;ul&gt;
  418. * &lt;li&gt;&lt;code&gt;combo&lt;/code&gt; : Ext.form.ComboBox &lt;div class=&quot;sub-desc&quot;&gt;This combo box&lt;/div&gt;&lt;/li&gt;
  419. * &lt;li&gt;&lt;code&gt;query&lt;/code&gt; : String &lt;div class=&quot;sub-desc&quot;&gt;The query&lt;/div&gt;&lt;/li&gt;
  420. * &lt;li&gt;&lt;code&gt;forceAll&lt;/code&gt; : Boolean &lt;div class=&quot;sub-desc&quot;&gt;True to force &quot;all&quot; query&lt;/div&gt;&lt;/li&gt;
  421. * &lt;li&gt;&lt;code&gt;cancel&lt;/code&gt; : Boolean &lt;div class=&quot;sub-desc&quot;&gt;Set to true to cancel the query&lt;/div&gt;&lt;/li&gt;
  422. * &lt;/ul&gt;
  423. */
  424. 'beforequery'
  425. );
  426. if(this.transform){
  427. var s = Ext.getDom(this.transform);
  428. if(!this.hiddenName){
  429. this.hiddenName = s.name;
  430. }
  431. if(!this.store){
  432. this.mode = 'local';
  433. var d = [], opts = s.options;
  434. for(var i = 0, len = opts.length;i &lt; len; i++){
  435. var o = opts[i],
  436. value = (o.hasAttribute ? o.hasAttribute('value') : o.getAttributeNode('value').specified) ? o.value : o.text;
  437. if(o.selected &amp;&amp; Ext.isEmpty(this.value, true)) {
  438. this.value = value;
  439. }
  440. d.push([value, o.text]);
  441. }
  442. this.store = new Ext.data.ArrayStore({
  443. idIndex: 0,
  444. fields: ['value', 'text'],
  445. data : d,
  446. autoDestroy: true
  447. });
  448. this.valueField = 'value';
  449. this.displayField = 'text';
  450. }
  451. s.name = Ext.id(); // wipe out the name in case somewhere else they have a reference
  452. if(!this.lazyRender){
  453. this.target = true;
  454. this.el = Ext.DomHelper.insertBefore(s, this.autoCreate || this.defaultAutoCreate);
  455. this.render(this.el.parentNode, s);
  456. }
  457. Ext.removeNode(s);
  458. }
  459. //auto-configure store from local array data
  460. else if(this.store){
  461. this.store = Ext.StoreMgr.lookup(this.store);
  462. if(this.store.autoCreated){
  463. this.displayField = this.valueField = 'field1';
  464. if(!this.store.expandData){
  465. this.displayField = 'field2';
  466. }
  467. this.mode = 'local';
  468. }
  469. }
  470. this.selectedIndex = -1;
  471. if(this.mode == 'local'){
  472. if(!Ext.isDefined(this.initialConfig.queryDelay)){
  473. this.queryDelay = 10;
  474. }
  475. if(!Ext.isDefined(this.initialConfig.minChars)){
  476. this.minChars = 0;
  477. }
  478. }
  479. },
  480. <span id='Ext-form-ComboBox-method-onRender'> // private
  481. </span> onRender : function(ct, position){
  482. if(this.hiddenName &amp;&amp; !Ext.isDefined(this.submitValue)){
  483. this.submitValue = false;
  484. }
  485. Ext.form.ComboBox.superclass.onRender.call(this, ct, position);
  486. if(this.hiddenName){
  487. this.hiddenField = this.el.insertSibling({tag:'input', type:'hidden', name: this.hiddenName,
  488. id: (this.hiddenId || Ext.id())}, 'before', true);
  489. }
  490. if(Ext.isGecko){
  491. this.el.dom.setAttribute('autocomplete', 'off');
  492. }
  493. if(!this.lazyInit){
  494. this.initList();
  495. }else{
  496. this.on('focus', this.initList, this, {single: true});
  497. }
  498. },
  499. <span id='Ext-form-ComboBox-method-initValue'> // private
  500. </span> initValue : function(){
  501. Ext.form.ComboBox.superclass.initValue.call(this);
  502. if(this.hiddenField){
  503. this.hiddenField.value =
  504. Ext.value(Ext.isDefined(this.hiddenValue) ? this.hiddenValue : this.value, '');
  505. }
  506. },
  507. <span id='Ext-form-ComboBox-method-getParentZIndex'> getParentZIndex : function(){
  508. </span> var zindex;
  509. if (this.ownerCt){
  510. this.findParentBy(function(ct){
  511. zindex = parseInt(ct.getPositionEl().getStyle('z-index'), 10);
  512. return !!zindex;
  513. });
  514. }
  515. return zindex;
  516. },
  517. <span id='Ext-form-ComboBox-method-getZIndex'> getZIndex : function(listParent){
  518. </span> listParent = listParent || Ext.getDom(this.getListParent() || Ext.getBody());
  519. var zindex = parseInt(Ext.fly(listParent).getStyle('z-index'), 10);
  520. if(!zindex){
  521. zindex = this.getParentZIndex();
  522. }
  523. return (zindex || 12000) + 5;
  524. },
  525. <span id='Ext-form-ComboBox-method-initList'> // private
  526. </span> initList : function(){
  527. if(!this.list){
  528. var cls = 'x-combo-list',
  529. listParent = Ext.getDom(this.getListParent() || Ext.getBody());
  530. this.list = new Ext.Layer({
  531. parentEl: listParent,
  532. shadow: this.shadow,
  533. cls: [cls, this.listClass].join(' '),
  534. constrain:false,
  535. zindex: this.getZIndex(listParent)
  536. });
  537. var lw = this.listWidth || Math.max(this.wrap.getWidth(), this.minListWidth);
  538. this.list.setSize(lw, 0);
  539. this.list.swallowEvent('mousewheel');
  540. this.assetHeight = 0;
  541. if(this.syncFont !== false){
  542. this.list.setStyle('font-size', this.el.getStyle('font-size'));
  543. }
  544. if(this.title){
  545. this.header = this.list.createChild({cls:cls+'-hd', html: this.title});
  546. this.assetHeight += this.header.getHeight();
  547. }
  548. this.innerList = this.list.createChild({cls:cls+'-inner'});
  549. this.mon(this.innerList, 'mouseover', this.onViewOver, this);
  550. this.mon(this.innerList, 'mousemove', this.onViewMove, this);
  551. this.innerList.setWidth(lw - this.list.getFrameWidth('lr'));
  552. if(this.pageSize){
  553. this.footer = this.list.createChild({cls:cls+'-ft'});
  554. this.pageTb = new Ext.PagingToolbar({
  555. store: this.store,
  556. pageSize: this.pageSize,
  557. renderTo:this.footer
  558. });
  559. this.assetHeight += this.footer.getHeight();
  560. }
  561. if(!this.tpl){
  562. <span id='Ext-form-ComboBox-cfg-tpl'> /**
  563. </span> * @cfg {String/Ext.XTemplate} tpl &lt;p&gt;The template string, or {@link Ext.XTemplate} instance to
  564. * use to display each item in the dropdown list. The dropdown list is displayed in a
  565. * DataView. See {@link #view}.&lt;/p&gt;
  566. * &lt;p&gt;The default template string is:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;
  567. '&amp;lt;tpl for=&quot;.&quot;&gt;&amp;lt;div class=&quot;x-combo-list-item&quot;&gt;{' + this.displayField + '}&amp;lt;/div&gt;&amp;lt;/tpl&gt;'
  568. * &lt;/code&gt;&lt;/pre&gt;
  569. * &lt;p&gt;Override the default value to create custom UI layouts for items in the list.
  570. * For example:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;
  571. '&amp;lt;tpl for=&quot;.&quot;&gt;&amp;lt;div ext:qtip=&quot;{state}. {nick}&quot; class=&quot;x-combo-list-item&quot;&gt;{state}&amp;lt;/div&gt;&amp;lt;/tpl&gt;'
  572. * &lt;/code&gt;&lt;/pre&gt;
  573. * &lt;p&gt;The template &lt;b&gt;must&lt;/b&gt; contain one or more substitution parameters using field
  574. * names from the Combo's&lt;/b&gt; {@link #store Store}. In the example above an
  575. * &lt;pre&gt;ext:qtip&lt;/pre&gt; attribute is added to display other fields from the Store.&lt;/p&gt;
  576. * &lt;p&gt;To preserve the default visual look of list items, add the CSS class name
  577. * &lt;pre&gt;x-combo-list-item&lt;/pre&gt; to the template's container element.&lt;/p&gt;
  578. * &lt;p&gt;Also see {@link #itemSelector} for additional details.&lt;/p&gt;
  579. */
  580. this.tpl = '&lt;tpl for=&quot;.&quot;&gt;&lt;div class=&quot;'+cls+'-item&quot;&gt;{' + this.displayField + '}&lt;/div&gt;&lt;/tpl&gt;';
  581. <span id='Ext-form-ComboBox-cfg-itemSelector'> /**
  582. </span> * @cfg {String} itemSelector
  583. * &lt;p&gt;A simple CSS selector (e.g. div.some-class or span:first-child) that will be
  584. * used to determine what nodes the {@link #view Ext.DataView} which handles the dropdown
  585. * display will be working with.&lt;/p&gt;
  586. * &lt;p&gt;&lt;b&gt;Note&lt;/b&gt;: this setting is &lt;b&gt;required&lt;/b&gt; if a custom XTemplate has been
  587. * specified in {@link #tpl} which assigns a class other than &lt;pre&gt;'x-combo-list-item'&lt;/pre&gt;
  588. * to dropdown list items&lt;/b&gt;
  589. */
  590. }
  591. <span id='Ext-form-ComboBox-property-view'> /**
  592. </span> * The {@link Ext.DataView DataView} used to display the ComboBox's options.
  593. * @type Ext.DataView
  594. */
  595. this.view = new Ext.DataView({
  596. applyTo: this.innerList,
  597. tpl: this.tpl,
  598. singleSelect: true,
  599. selectedClass: this.selectedClass,
  600. itemSelector: this.itemSelector || '.' + cls + '-item',
  601. emptyText: this.listEmptyText,
  602. deferEmptyText: false
  603. });
  604. this.mon(this.view, {
  605. containerclick : this.onViewClick,
  606. click : this.onViewClick,
  607. scope :this
  608. });
  609. this.bindStore(this.store, true);
  610. if(this.resizable){
  611. this.resizer = new Ext.Resizable(this.list, {
  612. pinned:true, handles:'se'
  613. });
  614. this.mon(this.resizer, 'resize', function(r, w, h){
  615. this.maxHeight = h-this.handleHeight-this.list.getFrameWidth('tb')-this.assetHeight;
  616. this.listWidth = w;
  617. this.innerList.setWidth(w - this.list.getFrameWidth('lr'));
  618. this.restrictHeight();
  619. }, this);
  620. this[this.pageSize?'footer':'innerList'].setStyle('margin-bottom', this.handleHeight+'px');
  621. }
  622. }
  623. },
  624. <span id='Ext-form-ComboBox-method-getListParent'> /**
  625. </span> * &lt;p&gt;Returns the element used to house this ComboBox's pop-up list. Defaults to the document body.&lt;/p&gt;
  626. * A custom implementation may be provided as a configuration option if the floating list needs to be rendered
  627. * to a different Element. An example might be rendering the list inside a Menu so that clicking
  628. * the list does not hide the Menu:&lt;pre&gt;&lt;code&gt;
  629. var store = new Ext.data.ArrayStore({
  630. autoDestroy: true,
  631. fields: ['initials', 'fullname'],
  632. data : [
  633. ['FF', 'Fred Flintstone'],
  634. ['BR', 'Barney Rubble']
  635. ]
  636. });
  637. var combo = new Ext.form.ComboBox({
  638. store: store,
  639. displayField: 'fullname',
  640. emptyText: 'Select a name...',
  641. forceSelection: true,
  642. getListParent: function() {
  643. return this.el.up('.x-menu');
  644. },
  645. iconCls: 'no-icon', //use iconCls if placing within menu to shift to right side of menu
  646. mode: 'local',
  647. selectOnFocus: true,
  648. triggerAction: 'all',
  649. typeAhead: true,
  650. width: 135
  651. });
  652. var menu = new Ext.menu.Menu({
  653. id: 'mainMenu',
  654. items: [
  655. combo // A Field in a Menu
  656. ]
  657. });
  658. &lt;/code&gt;&lt;/pre&gt;
  659. */
  660. getListParent : function() {
  661. return document.body;
  662. },
  663. <span id='Ext-form-ComboBox-method-getStore'> /**
  664. </span> * Returns the store associated with this combo.
  665. * @return {Ext.data.Store} The store
  666. */
  667. getStore : function(){
  668. return this.store;
  669. },
  670. <span id='Ext-form-ComboBox-method-bindStore'> // private
  671. </span> bindStore : function(store, initial){
  672. if(this.store &amp;&amp; !initial){
  673. if(this.store !== store &amp;&amp; this.store.autoDestroy){
  674. this.store.destroy();
  675. }else{
  676. this.store.un('beforeload', this.onBeforeLoad, this);
  677. this.store.un('load', this.onLoad, this);
  678. this.store.un('exception', this.collapse, this);
  679. }
  680. if(!store){
  681. this.store = null;
  682. if(this.view){
  683. this.view.bindStore(null);
  684. }
  685. if(this.pageTb){
  686. this.pageTb.bindStore(null);
  687. }
  688. }
  689. }
  690. if(store){
  691. if(!initial) {
  692. this.lastQuery = null;
  693. if(this.pageTb) {
  694. this.pageTb.bindStore(store);
  695. }
  696. }
  697. this.store = Ext.StoreMgr.lookup(store);
  698. this.store.on({
  699. scope: this,
  700. beforeload: this.onBeforeLoad,
  701. load: this.onLoad,
  702. exception: this.collapse
  703. });
  704. if(this.view){
  705. this.view.bindStore(store);
  706. }
  707. }
  708. },
  709. <span id='Ext-form-ComboBox-method-reset'> reset : function(){
  710. </span> if(this.clearFilterOnReset &amp;&amp; this.mode == 'local'){
  711. this.store.clearFilter();
  712. }
  713. Ext.form.ComboBox.superclass.reset.call(this);
  714. },
  715. <span id='Ext-form-ComboBox-method-initEvents'> // private
  716. </span> initEvents : function(){
  717. Ext.form.ComboBox.superclass.initEvents.call(this);
  718. <span id='Ext-form-ComboBox-property-keyNav'> /**
  719. </span> * @property keyNav
  720. * @type Ext.KeyNav
  721. * &lt;p&gt;A {@link Ext.KeyNav KeyNav} object which handles navigation keys for this ComboBox. This performs actions
  722. * based on keystrokes typed when the input field is focused.&lt;/p&gt;
  723. * &lt;p&gt;&lt;b&gt;After the ComboBox has been rendered&lt;/b&gt;, you may override existing navigation key functionality,
  724. * or add your own based upon key names as specified in the {@link Ext.KeyNav KeyNav} class.&lt;/p&gt;
  725. * &lt;p&gt;The function is executed in the scope (&lt;code&gt;this&lt;/code&gt; reference of the ComboBox. Example:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;
  726. myCombo.keyNav.esc = function(e) { // Override ESC handling function
  727. this.collapse(); // Standard behaviour of Ext's ComboBox.
  728. this.setValue(this.startValue); // We reset to starting value on ESC
  729. };
  730. myCombo.keyNav.tab = function() { // Override TAB handling function
  731. this.onViewClick(false); // Select the currently highlighted row
  732. };
  733. &lt;/code&gt;&lt;/pre&gt;
  734. */
  735. this.keyNav = new Ext.KeyNav(this.el, {
  736. &quot;up&quot; : function(e){
  737. this.inKeyMode = true;
  738. this.selectPrev();
  739. },
  740. &quot;down&quot; : function(e){
  741. if(!this.isExpanded()){
  742. this.onTriggerClick();
  743. }else{
  744. this.inKeyMode = true;
  745. this.selectNext();
  746. }
  747. },
  748. &quot;enter&quot; : function(e){
  749. this.onViewClick();
  750. },
  751. &quot;esc&quot; : function(e){
  752. this.collapse();
  753. },
  754. &quot;tab&quot; : function(e){
  755. if (this.forceSelection === true) {
  756. this.collapse();
  757. } else {
  758. this.onViewClick(false);
  759. }
  760. return true;
  761. },
  762. scope : this,
  763. doRelay : function(e, h, hname){
  764. if(hname == 'down' || this.scope.isExpanded()){
  765. // this MUST be called before ComboBox#fireKey()
  766. var relay = Ext.KeyNav.prototype.doRelay.apply(this, arguments);
  767. if((((Ext.isIE9 &amp;&amp; Ext.isStrict) || Ext.isIE10p) || !Ext.isIE) &amp;&amp; Ext.EventManager.useKeydown){
  768. // call Combo#fireKey() for browsers which use keydown event (except IE)
  769. this.scope.fireKey(e);
  770. }
  771. return relay;
  772. }
  773. return true;
  774. },
  775. forceKeyDown : true,
  776. defaultEventAction: 'stopEvent'
  777. });
  778. this.queryDelay = Math.max(this.queryDelay || 10,
  779. this.mode == 'local' ? 10 : 250);
  780. this.dqTask = new Ext.util.DelayedTask(this.initQuery, this);
  781. if(this.typeAhead){
  782. this.taTask = new Ext.util.DelayedTask(this.onTypeAhead, this);
  783. }
  784. if(!this.enableKeyEvents){
  785. this.mon(this.el, 'keyup', this.onKeyUp, this);
  786. }
  787. },
  788. <span id='Ext-form-ComboBox-method-onDestroy'> // private
  789. </span> onDestroy : function(){
  790. if (this.dqTask){
  791. this.dqTask.cancel();
  792. this.dqTask = null;
  793. }
  794. this.bindStore(null);
  795. Ext.destroy(
  796. this.resizer,
  797. this.view,
  798. this.pageTb,
  799. this.list
  800. );
  801. Ext.destroyMembers(this, 'hiddenField');
  802. Ext.form.ComboBox.superclass.onDestroy.call(this);
  803. },
  804. <span id='Ext-form-ComboBox-method-fireKey'> // private
  805. </span> fireKey : function(e){
  806. if (!this.isExpanded()) {
  807. Ext.form.ComboBox.superclass.fireKey.call(this, e);
  808. }
  809. },
  810. <span id='Ext-form-ComboBox-method-onResize'> // private
  811. </span> onResize : function(w, h){
  812. Ext.form.ComboBox.superclass.onResize.apply(this, arguments);
  813. if(!isNaN(w) &amp;&amp; this.isVisible() &amp;&amp; this.list){
  814. this.doResize(w);
  815. }else{
  816. this.bufferSize = w;
  817. }
  818. },
  819. <span id='Ext-form-ComboBox-method-doResize'> doResize: function(w){
  820. </span> if(!Ext.isDefined(this.listWidth)){
  821. var lw = Math.max(w, this.minListWidth);
  822. this.list.setWidth(lw);
  823. this.innerList.setWidth(lw - this.list.getFrameWidth('lr'));
  824. }
  825. },
  826. <span id='Ext-form-ComboBox-method-onEnable'> // private
  827. </span> onEnable : function(){
  828. Ext.form.ComboBox.superclass.onEnable.apply(this, arguments);
  829. if(this.hiddenField){
  830. this.hiddenField.disabled = false;
  831. }
  832. },
  833. <span id='Ext-form-ComboBox-method-onDisable'> // private
  834. </span> onDisable : function(){
  835. Ext.form.ComboBox.superclass.onDisable.apply(this, arguments);
  836. if(this.hiddenField){
  837. this.hiddenField.disabled = true;
  838. }
  839. },
  840. <span id='Ext-form-ComboBox-method-onBeforeLoad'> // private
  841. </span> onBeforeLoad : function(){
  842. if(!this.hasFocus){
  843. return;
  844. }
  845. this.innerList.update(this.loadingText ?
  846. '&lt;div class=&quot;loading-indicator&quot;&gt;'+this.loadingText+'&lt;/div&gt;' : '');
  847. this.restrictHeight();
  848. this.selectedIndex = -1;
  849. },
  850. <span id='Ext-form-ComboBox-method-onLoad'> // private
  851. </span> onLoad : function(){
  852. if(!this.hasFocus){
  853. return;
  854. }
  855. if(this.store.getCount() &gt; 0 || this.listEmptyText){
  856. this.expand();
  857. this.restrictHeight();
  858. if(this.lastQuery == this.allQuery){
  859. if(this.editable){
  860. this.el.dom.select();
  861. }
  862. if(this.autoSelect !== false &amp;&amp; !this.selectByValue(this.value, true)){
  863. this.select(0, true);
  864. }
  865. }else{
  866. if(this.autoSelect !== false){
  867. this.selectNext();
  868. }
  869. if(this.typeAhead &amp;&amp; this.lastKey != Ext.EventObject.BACKSPACE &amp;&amp; this.lastKey != Ext.EventObject.DELETE){
  870. this.taTask.delay(this.typeAheadDelay);
  871. }
  872. }
  873. }else{
  874. this.collapse();
  875. }
  876. },
  877. <span id='Ext-form-ComboBox-method-onTypeAhead'> // private
  878. </span> onTypeAhead : function(){
  879. if(this.store.getCount() &gt; 0){
  880. var r = this.store.getAt(0);
  881. var newValue = r.data[this.displayField];
  882. var len = newValue.length;
  883. var selStart = this.getRawValue().length;
  884. if(selStart != len){
  885. this.setRawValue(newValue);
  886. this.selectText(selStart, newValue.length);
  887. }
  888. }
  889. },
  890. <span id='Ext-form-ComboBox-method-assertValue'> // private
  891. </span> assertValue : function(){
  892. var val = this.getRawValue(),
  893. rec;
  894. if(this.valueField &amp;&amp; Ext.isDefined(this.value)){
  895. rec = this.findRecord(this.valueField, this.value);
  896. }
  897. if(!rec || rec.get(this.displayField) != val){
  898. rec = this.findRecord(this.displayField, val);
  899. }
  900. if(!rec &amp;&amp; this.forceSelection){
  901. if(val.length &gt; 0 &amp;&amp; val != this.emptyText){
  902. this.el.dom.value = Ext.value(this.lastSelectionText, '');
  903. this.applyEmptyText();
  904. }else{
  905. this.clearValue();
  906. }
  907. }else{
  908. if(rec &amp;&amp; this.valueField){
  909. // onSelect may have already set the value and by doing so
  910. // set the display field properly. Let's not wipe out the
  911. // valueField here by just sending the displayField.
  912. if (this.value == val){
  913. return;
  914. }
  915. val = rec.get(this.valueField || this.displayField);
  916. }
  917. this.setValue(val);
  918. }
  919. },
  920. <span id='Ext-form-ComboBox-method-onSelect'> // private
  921. </span> onSelect : function(record, index){
  922. if(this.fireEvent('beforeselect', this, record, index) !== false){
  923. this.setValue(record.data[this.valueField || this.displayField]);
  924. this.collapse();
  925. this.fireEvent('select', this, record, index);
  926. }
  927. },
  928. <span id='Ext-form-ComboBox-method-getName'> // inherit docs
  929. </span> getName: function(){
  930. var hf = this.hiddenField;
  931. return hf &amp;&amp; hf.name ? hf.name : this.hiddenName || Ext.form.ComboBox.superclass.getName.call(this);
  932. },
  933. <span id='Ext-form-ComboBox-method-getValue'> /**
  934. </span> * Returns the currently selected field value or empty string if no value is set.
  935. * @return {String} value The selected value
  936. */
  937. getValue : function(){
  938. if(this.valueField){
  939. return Ext.isDefined(this.value) ? this.value : '';
  940. }else{
  941. return Ext.form.ComboBox.superclass.getValue.call(this);
  942. }
  943. },
  944. <span id='Ext-form-ComboBox-method-clearValue'> /**
  945. </span> * Clears any text/value currently set in the field
  946. */
  947. clearValue : function(){
  948. if(this.hiddenField){
  949. this.hiddenField.value = '';
  950. }
  951. this.setRawValue('');
  952. this.lastSelectionText = '';
  953. this.applyEmptyText();
  954. this.value = '';
  955. },
  956. <span id='Ext-form-ComboBox-method-setValue'> /**
  957. </span> * Sets the specified value into the field. If the value finds a match, the corresponding record text
  958. * will be displayed in the field. If the value does not match the data value of an existing item,
  959. * and the valueNotFoundText config option is defined, it will be displayed as the default field text.
  960. * Otherwise the field will be blank (although the value will still be set).
  961. * @param {String} value The value to match
  962. * @return {Ext.form.Field} this
  963. */
  964. setValue : function(v){
  965. var text = v;
  966. if(this.valueField){
  967. var r = this.findRecord(this.valueField, v);
  968. if(r){
  969. text = r.data[this.displayField];
  970. }else if(Ext.isDefined(this.valueNotFoundText)){
  971. text = this.valueNotFoundText;
  972. }
  973. }
  974. this.lastSelectionText = text;
  975. if(this.hiddenField){
  976. this.hiddenField.value = Ext.value(v, '');
  977. }
  978. Ext.form.ComboBox.superclass.setValue.call(this, text);
  979. this.value = v;
  980. return this;
  981. },
  982. <span id='Ext-form-ComboBox-method-findRecord'> // private
  983. </span> findRecord : function(prop, value){
  984. var record;
  985. if(this.store.getCount() &gt; 0){
  986. this.store.each(function(r){
  987. if(r.data[prop] == value){
  988. record = r;
  989. return false;
  990. }
  991. });
  992. }
  993. return record;
  994. },
  995. <span id='Ext-form-ComboBox-method-onViewMove'> // private
  996. </span> onViewMove : function(e, t){
  997. this.inKeyMode = false;
  998. },
  999. <span id='Ext-form-ComboBox-method-onViewOver'> // private
  1000. </span> onViewOver : function(e, t){
  1001. if(this.inKeyMode){ // prevent key nav and mouse over conflicts
  1002. return;
  1003. }
  1004. var item = this.view.findItemFromChild(t);
  1005. if(item){
  1006. var index = this.view.indexOf(item);
  1007. this.select(index, false);
  1008. }
  1009. },
  1010. <span id='Ext-form-ComboBox-method-onViewClick'> // private
  1011. </span> onViewClick : function(doFocus){
  1012. var index = this.view.getSelectedIndexes()[0],
  1013. s = this.store,
  1014. r = s.getAt(index);
  1015. if(r){
  1016. this.onSelect(r, index);
  1017. }else {
  1018. this.collapse();
  1019. }
  1020. if(doFocus !== false){
  1021. this.el.focus();
  1022. }
  1023. },
  1024. <span id='Ext-form-ComboBox-method-restrictHeight'> // private
  1025. </span> restrictHeight : function(){
  1026. this.innerList.dom.style.height = '';
  1027. var inner = this.innerList.dom,
  1028. pad = this.list.getFrameWidth('tb') + (this.resizable ? this.handleHeight : 0) + this.assetHeight,
  1029. h = Math.max(inner.clientHeight, inner.offsetHeight, inner.scrollHeight),
  1030. ha = this.getPosition()[1]-Ext.getBody().getScroll().top,
  1031. hb = Ext.lib.Dom.getViewHeight()-ha-this.getSize().height,
  1032. space = Math.max(ha, hb, this.minHeight || 0)-this.list.shadowOffset-pad-5;
  1033. h = Math.min(h, space, this.maxHeight);
  1034. this.innerList.setHeight(h);
  1035. this.list.beginUpdate();
  1036. this.list.setHeight(h+pad);
  1037. this.list.alignTo.apply(this.list, [this.el].concat(this.listAlign));
  1038. this.list.endUpdate();
  1039. },
  1040. <span id='Ext-form-ComboBox-method-isExpanded'> /**
  1041. </span> * Returns true if the dropdown list is expanded, else false.
  1042. */
  1043. isExpanded : function(){
  1044. return this.list &amp;&amp; this.list.isVisible();
  1045. },
  1046. <span id='Ext-form-ComboBox-method-selectByValue'> /**
  1047. </span> * Select an item in the dropdown list by its data value. This function does NOT cause the select event to fire.
  1048. * The store must be loaded and the list expanded for this function to work, otherwise use setValue.
  1049. * @param {String} value The data value of the item to select
  1050. * @param {Boolean} scrollIntoView False to prevent the dropdown list from autoscrolling to display the
  1051. * selected item if it is not currently in view (defaults to true)
  1052. * @return {Boolean} True if the value matched an item in the list, else false
  1053. */
  1054. selectByValue : function(v, scrollIntoView){
  1055. if(!Ext.isEmpty(v, true)){
  1056. var r = this.findRecord(this.valueField || this.displayField, v);
  1057. if(r){
  1058. this.select(this.store.indexOf(r), scrollIntoView);
  1059. return true;
  1060. }
  1061. }
  1062. return false;
  1063. },
  1064. <span id='Ext-form-ComboBox-method-select'> /**
  1065. </span> * Select an item in the dropdown list by its numeric index in the list. This function does NOT cause the select event to fire.
  1066. * The store must be loaded and the list expanded for this function to work, otherwise use setValue.
  1067. * @param {Number} index The zero-based index of the list item to select
  1068. * @param {Boolean} scrollIntoView False to prevent the dropdown list from autoscrolling to display the
  1069. * selected item if it is not currently in view (defaults to true)
  1070. */
  1071. select : function(index, scrollIntoView){
  1072. this.selectedIndex = index;
  1073. this.view.select(index);
  1074. if(scrollIntoView !== false){
  1075. var el = this.view.getNode(index);
  1076. if(el){
  1077. this.innerList.scrollChildIntoView(el, false);
  1078. }
  1079. }
  1080. },
  1081. <span id='Ext-form-ComboBox-method-selectNext'> // private
  1082. </span> selectNext : function(){
  1083. var ct = this.store.getCount();
  1084. if(ct &gt; 0){
  1085. if(this.selectedIndex == -1){
  1086. this.select(0);
  1087. }else if(this.selectedIndex &lt; ct-1){
  1088. this.select(this.selectedIndex+1);
  1089. }
  1090. }
  1091. },
  1092. <span id='Ext-form-ComboBox-method-selectPrev'> // private
  1093. </span> selectPrev : function(){
  1094. var ct = this.store.getCount();
  1095. if(ct &gt; 0){
  1096. if(this.selectedIndex == -1){
  1097. this.select(0);
  1098. }else if(this.selectedIndex !== 0){
  1099. this.select(this.selectedIndex-1);
  1100. }
  1101. }
  1102. },
  1103. <span id='Ext-form-ComboBox-method-onKeyUp'> // private
  1104. </span> onKeyUp : function(e){
  1105. var k = e.getKey();
  1106. if(this.editable !== false &amp;&amp; this.readOnly !== true &amp;&amp; (k == e.BACKSPACE || !e.isSpecialKey())){
  1107. this.lastKey = k;
  1108. this.dqTask.delay(this.queryDelay);
  1109. }
  1110. Ext.form.ComboBox.superclass.onKeyUp.call(this, e);
  1111. },
  1112. <span id='Ext-form-ComboBox-method-validateBlur'> // private
  1113. </span> validateBlur : function(){
  1114. return !this.list || !this.list.isVisible();
  1115. },
  1116. <span id='Ext-form-ComboBox-method-initQuery'> // private
  1117. </span> initQuery : function(){
  1118. this.doQuery(this.getRawValue());
  1119. },
  1120. <span id='Ext-form-ComboBox-method-beforeBlur'> // private
  1121. </span> beforeBlur : function(){
  1122. this.assertValue();
  1123. },
  1124. <span id='Ext-form-ComboBox-method-postBlur'> // private
  1125. </span> postBlur : function(){
  1126. Ext.form.ComboBox.superclass.postBlur.call(this);
  1127. this.collapse();
  1128. this.inKeyMode = false;
  1129. },
  1130. <span id='Ext-form-ComboBox-method-doQuery'> /**
  1131. </span> * Execute a query to filter the dropdown list. Fires the {@link #beforequery} event prior to performing the
  1132. * query allowing the query action to be canceled if needed.
  1133. * @param {String} query The SQL query to execute
  1134. * @param {Boolean} forceAll &lt;tt&gt;true&lt;/tt&gt; to force the query to execute even if there are currently fewer
  1135. * characters in the field than the minimum specified by the &lt;tt&gt;{@link #minChars}&lt;/tt&gt; config option. It
  1136. * also clears any filter previously saved in the current store (defaults to &lt;tt&gt;false&lt;/tt&gt;)
  1137. */
  1138. doQuery : function(q, forceAll){
  1139. q = Ext.isEmpty(q) ? '' : q;
  1140. var qe = {
  1141. query: q,
  1142. forceAll: forceAll,
  1143. combo: this,
  1144. cancel:false
  1145. };
  1146. if(this.fireEvent('beforequery', qe)===false || qe.cancel){
  1147. return false;
  1148. }
  1149. q = qe.query;
  1150. forceAll = qe.forceAll;
  1151. if(forceAll === true || (q.length &gt;= this.minChars)){
  1152. if(this.lastQuery !== q){
  1153. this.lastQuery = q;
  1154. if(this.mode == 'local'){
  1155. this.selectedIndex = -1;
  1156. if(forceAll){
  1157. this.store.clearFilter();
  1158. }else{
  1159. this.store.filter(this.displayField, q);
  1160. }
  1161. this.onLoad();
  1162. }else{
  1163. this.store.baseParams[this.queryParam] = q;
  1164. this.store.load({
  1165. params: this.getParams(q)
  1166. });
  1167. this.expand();
  1168. }
  1169. }else{
  1170. this.selectedIndex = -1;
  1171. this.onLoad();
  1172. }
  1173. }
  1174. },
  1175. <span id='Ext-form-ComboBox-method-getParams'> // private
  1176. </span> getParams : function(q){
  1177. var params = {},
  1178. paramNames = this.store.paramNames;
  1179. if(this.pageSize){
  1180. params[paramNames.start] = 0;
  1181. params[paramNames.limit] = this.pageSize;
  1182. }
  1183. return params;
  1184. },
  1185. <span id='Ext-form-ComboBox-method-collapse'> /**
  1186. </span> * Hides the dropdown list if it is currently expanded. Fires the {@link #collapse} event on completion.
  1187. */
  1188. collapse : function(){
  1189. if(!this.isExpanded()){
  1190. return;
  1191. }
  1192. this.list.hide();
  1193. Ext.getDoc().un('mousewheel', this.collapseIf, this);
  1194. Ext.getDoc().un('mousedown', this.collapseIf, this);
  1195. this.fireEvent('collapse', this);
  1196. },
  1197. <span id='Ext-form-ComboBox-method-collapseIf'> // private
  1198. </span> collapseIf : function(e){
  1199. if(!this.isDestroyed &amp;&amp; !e.within(this.wrap) &amp;&amp; !e.within(this.list)){
  1200. this.collapse();
  1201. }
  1202. },
  1203. <span id='Ext-form-ComboBox-method-expand'> /**
  1204. </span> * Expands the dropdown list if it is currently hidden. Fires the {@link #expand} event on completion.
  1205. */
  1206. expand : function(){
  1207. if(this.isExpanded() || !this.hasFocus){
  1208. return;
  1209. }
  1210. if(this.title || this.pageSize){
  1211. this.assetHeight = 0;
  1212. if(this.title){
  1213. this.assetHeight += this.header.getHeight();
  1214. }
  1215. if(this.pageSize){
  1216. this.assetHeight += this.footer.getHeight();
  1217. }
  1218. }
  1219. if(this.bufferSize){
  1220. this.doResize(this.bufferSize);
  1221. delete this.bufferSize;
  1222. }
  1223. this.list.alignTo.apply(this.list, [this.el].concat(this.listAlign));
  1224. // zindex can change, re-check it and set it if necessary
  1225. this.list.setZIndex(this.getZIndex());
  1226. this.list.show();
  1227. if(Ext.isGecko2){
  1228. this.innerList.setOverflow('auto'); // necessary for FF 2.0/Mac
  1229. }
  1230. this.mon(Ext.getDoc(), {
  1231. scope: this,
  1232. mousewheel: this.collapseIf,
  1233. mousedown: this.collapseIf
  1234. });
  1235. this.fireEvent('expand', this);
  1236. },
  1237. <span id='Ext-form-ComboBox-method-onTriggerClick'> /**
  1238. </span> * @method onTriggerClick
  1239. * @hide
  1240. */
  1241. <span id='Ext-form-ComboBox-method-onTriggerClick'> // private
  1242. </span> // Implements the default empty TriggerField.onTriggerClick function
  1243. onTriggerClick : function(){
  1244. if(this.readOnly || this.disabled){
  1245. return;
  1246. }
  1247. if(this.isExpanded()){
  1248. this.collapse();
  1249. this.el.focus();
  1250. }else {
  1251. this.onFocus({});
  1252. if(this.triggerAction == 'all') {
  1253. this.doQuery(this.allQuery, true);
  1254. } else {
  1255. this.doQuery(this.getRawValue());
  1256. }
  1257. this.el.focus();
  1258. }
  1259. }
  1260. <span id='Ext-form-ComboBox-method-autoSize'> /**
  1261. </span> * @hide
  1262. * @method autoSize
  1263. */
  1264. <span id='Ext-form-ComboBox-cfg-grow'> /**
  1265. </span> * @cfg {Boolean} grow @hide
  1266. */
  1267. <span id='Ext-form-ComboBox-cfg-growMin'> /**
  1268. </span> * @cfg {Number} growMin @hide
  1269. */
  1270. <span id='Ext-form-ComboBox-cfg-growMax'> /**
  1271. </span> * @cfg {Number} growMax @hide
  1272. */
  1273. });
  1274. Ext.reg('combo', Ext.form.ComboBox);
  1275. </pre>
  1276. </body>
  1277. </html>