From 47799db691861e806cf56bf71aae1886ad316096 Mon Sep 17 00:00:00 2001 From: Tommy Wang Date: Mon, 21 Feb 2022 11:13:23 -0600 Subject: [PATCH] fix select2-4.js to prevent duplicate options --- tagulous/static/tagulous/adaptor/select2-4.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tagulous/static/tagulous/adaptor/select2-4.js b/tagulous/static/tagulous/adaptor/select2-4.js index 6337a32..ec9ddf4 100644 --- a/tagulous/static/tagulous/adaptor/select2-4.js +++ b/tagulous/static/tagulous/adaptor/select2-4.js @@ -172,7 +172,8 @@ quotedTags: true, allowClear: !options.required, maximumSelectionLength: isSingle ? null : options.max_count || null, - spaceDelimiter: options.space_delimiter !== false + spaceDelimiter: options.space_delimiter !== false, + placeholder: options.placeholder || '', }); // Add in any specific to the field type @@ -252,6 +253,7 @@ var $selectCtl = $selectEl.select2(args); if (selectedTags.length > 0) { + if (url) { var selectedData = []; for (var i=0; i