Skip to content

Commit

Permalink
autocomplete tagsep - fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Harald von Waldow committed May 11, 2018
1 parent 220831d commit babb752
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions ckan/public/base/javascript/modules/autocomplete.js
Expand Up @@ -2,14 +2,16 @@
* a list of terms from an API endpoint (provided using data-module-source).
*
* source - A url pointing to an API autocomplete endpoint.
* interval - The interval between requests in milliseconds (default: 1000).
* interval - The interval between requests in milliseconds (default: 300).
* items - The max number of items to display (default: 10)
* tags - Boolean attribute if true will create a tag input.
* key - A string of the key you want to be the form value to end up on
* from the ajax returned results
* label - A string of the label you want to appear within the dropdown for
* returned results
*
* tokensep - An array (passed as string) that contains characters which will
be interpreted as separators for tags when typed or pasted
(default "[',']").
* Examples
*
* // <input name="tags" data-module="autocomplete" data-module-source="http://" />
Expand All @@ -24,6 +26,7 @@ this.ckan.module('autocomplete', function (jQuery) {
label: false,
items: 10,
source: null,
tokensep: [','],
interval: 300,
dropdownClass: '',
containerClass: ''
Expand All @@ -50,7 +53,8 @@ this.ckan.module('autocomplete', function (jQuery) {
formatNoMatches: this.formatNoMatches,
formatInputTooShort: this.formatInputTooShort,
dropdownCssClass: this.options.dropdownClass,
containerCssClass: this.options.containerClass
containerCssClass: this.options.containerClass,
tokenSeparators: eval(this.options.tokensep)
};

// Different keys are required depending on whether the select is
Expand Down

0 comments on commit babb752

Please sign in to comment.