You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: entries/autocomplete.xml
+30Lines changed: 30 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -177,6 +177,36 @@
177
177
<desc>Returns a <code>jQuery</code> object containing the menu element. Although the menu items are constantly created and destroyed, the menu element itself is created during initialization and is constantly reused.</desc>
178
178
</method>
179
179
</methods>
180
+
<extension-points>
181
+
<methodname="_renderItem"return="jQuery">
182
+
<desc>
183
+
<p>Method that controls the creation of each option in the widget's menu. The method must create a new <code><li></code> element, append it to the menu, and return it.</p>
184
+
<p><em>Note: At this time the<code><ul></code> element created must contain an <code><a></code> element for compatibility with the <ahref="/menu/">menu</a> widget. See the example below.</em></p>
185
+
</desc>
186
+
<argumentname="ul"type="jQuery">
187
+
<desc>The <code><ul></code> element that the newly created <code><li></code> element must be appended to.</desc>
188
+
</argument>
189
+
<argumentname="item"type="Object">
190
+
<propertyname="label"type="String">
191
+
<desc>The string to display for the item.</desc>
192
+
</property>
193
+
<propertyname="value"type="String">
194
+
<desc>The value to insert into the input when the item is selected.</desc>
195
+
</property>
196
+
</argument>
197
+
<example>
198
+
<desc>Add the item's value as a data attribute on the <code><li></code>.</desc>
0 commit comments