Skip to content

Commit 6fbea9a

Browse files
committed
Merge pull request #666 from parsonsmatt/master
Docs/usage: Add details to create function
2 parents 253e1dd + 425c1f8 commit 6fbea9a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/usage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ $(function() {
4949
<tr>
5050
<td valign="top"><code>create</code></td>
5151
<td valign="top">
52-
Allows the user to create a new items that aren't in the list of options. This option can be any of the following: "true", "false" (disabled), or a function that accepts two arguments: "input" and "callback". The callback should be invoked with the final data for the option.</td>
52+
Allows the user to create a new items that aren't in the list of options. This option can be any of the following: "true", "false" (disabled), or a function to process input. The function can take one of two forms: synchronous (with signature <code>function(input){}</code> or asynchronous (with signature <code>function(input, callback)</code>. In the synchronous case, the function should <code>return</code> an object for the options (eg, with defaults: <code>return { 'value': value, 'text': text };</code>). The asynchronous version should invoke the callback with the result in the same format as the object above (eg, <code>callback( { 'value': value, 'text': text});</code>)</td>
5353
<td valign="top"><code>mixed</code></td>
5454
<td valign="top"><code>false</code></td>
5555
</tr>

0 commit comments

Comments
 (0)