Skip to content

Commit

Permalink
separation tags as chars from str.split()
Browse files Browse the repository at this point in the history
  • Loading branch information
Harald von Waldow committed May 17, 2018
1 parent babb752 commit 56b35b8
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions ckan/public/base/javascript/modules/autocomplete.js
Expand Up @@ -9,9 +9,8 @@
* 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 "[',']").
* tokensep - A 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 @@ -26,7 +25,7 @@ this.ckan.module('autocomplete', function (jQuery) {
label: false,
items: 10,
source: null,
tokensep: [','],
tokensep: ',',
interval: 300,
dropdownClass: '',
containerClass: ''
Expand Down Expand Up @@ -54,7 +53,7 @@ this.ckan.module('autocomplete', function (jQuery) {
formatInputTooShort: this.formatInputTooShort,
dropdownCssClass: this.options.dropdownClass,
containerCssClass: this.options.containerClass,
tokenSeparators: eval(this.options.tokensep)
tokenSeparators: this.options.tokensep.split('')
};

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

0 comments on commit 56b35b8

Please sign in to comment.