![]() You can define the list workflow using the children property on List Objects.Īs a shorthand method, you can provide an array of Option Objects anywhere that expects a full List Object. The options for a List Object can be sourced directly in the JavaScript or externally with AJAX. They define the options available to the user when they are typing. List Objects are the heart of the AutoComplete widget. The function should return an HTML string.Ī number of connected items or names written or printed consecutively, typically one below the other. If tokenSeparatorHTML is a function the first argument is the Token Object to the left of the separator, the second argument is the Token Object to the right. ![]() The HTML string to put between Tokens in the search bar. If showErrors is a function then the first argument is the unique error code, the second argument is an error string, and an optional third argument is a data structure that is relevant to the error. If showErrors is 'alert' then errors will be sent to window.alert(). If showErrors is 'console' then errors will be sent to console.log(). If showErrors is false then errors will be ignored. ShowErrors is an optional parameter to control how AutoComplete reports errors.Įvery error in AutoComplete has a unique code to help diagnose problems and search for solutions. If not, the original new value becomes the value of the widget.Ī placeholder to show in the AutoComplete widget when there are no Token Groups. If this function returns a valid widget value, then that value becomes the value of the widget. The first argument to the function is the new value of the widget, the second argument is the old value of the widget. Set maxTokenGroups to false to allow unlimited Token Groups.įunction to execute when the value of the widget changes. The maximum number of Token Groups allowed in the search bar. Lists should be an object where the property values are the names of lists, and the values are List Objects. The lists property contains all of the lists used to power the dropdown options. If provided, sets the initial value of the AutoComplete widget. InitialList is required when there are more than one List Objects on config.lists. It's value should be the name of a List Object. The initialList property is the first list started when the user clicks on the AutoComplete widget. See the Simple List Example.Īs another shorthand method, you can provide a single string value and AutoComplete assumes it's an AJAX url. You define your List Objects - which control which options are available to the user - on the lists property.Īs a shorthand method, you can provide an array of Option Objects to the config object and it will be expanded as the default list for the widget. The Config Object initializes the AutoComplete widget.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |