From fe101be1cc031675f7136727bc94f1c40e879876 Mon Sep 17 00:00:00 2001 From: Robert Hunt Date: Mon, 14 Aug 2017 08:29:36 +0100 Subject: [PATCH 1/2] Added a fix to ensure an empty value is always submitted (like repeaters) --- templates/bolt/editcontent/fields/_ajaxmultictselect.twig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/templates/bolt/editcontent/fields/_ajaxmultictselect.twig b/templates/bolt/editcontent/fields/_ajaxmultictselect.twig index 1138e30..148d6c1 100644 --- a/templates/bolt/editcontent/fields/_ajaxmultictselect.twig +++ b/templates/bolt/editcontent/fields/_ajaxmultictselect.twig @@ -85,7 +85,10 @@ sortable: field.sortable|default(false) 'name': key, 'field': field } %} - + + {# This ensures that an empty value is always submitted #} + +
{{ buic_select(buic_opt_select) }}
From 0201365e78b36026ce75dd2841fe2710823701ba Mon Sep 17 00:00:00 2001 From: Robert Hunt Date: Mon, 14 Aug 2017 08:30:53 +0100 Subject: [PATCH 2/2] Fallback to allow clear by default --- web/ajax-multict-select-field.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/ajax-multict-select-field.js b/web/ajax-multict-select-field.js index 1ab319e..a4d4bf0 100644 --- a/web/ajax-multict-select-field.js +++ b/web/ajax-multict-select-field.js @@ -46,7 +46,7 @@ } }, placeholder : options.placeholder, - allowClear : options.allowClear, + allowClear : options.allowClear || true, minimumResultsForSearch : options.minimumResultsForSearch, width : options.width, ajax : {