Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Multiple can detect itself from the attribute.

Matthew Kennedyb9184e9f8f08
diff --git a/backend/app/assets/javascripts/spree/backend/spree-select2.js b/backend/app/assets/javascripts/spree/backend/spree-select2.js
index b3212dec1d..c9ef898301 100644
--- a/backend/app/assets/javascripts/spree/backend/spree-select2.js
+++ b/backend/app/assets/javascripts/spree/backend/spree-select2.js
@@ -11,13 +11,6 @@ document.addEventListener('DOMContentLoaded', function() {
placeholder: Spree.translations.select_an_option,
allowClear: true
})
-
- // Inititate a Select2 with the multiple set to true, on any select element with the class .select2-multiple
- // Set include_blank: false in your ERB.
- // Manually add a placeholder in the html or ERB as needed.
- $('select.select2-multiple').select2({
- multiple: true
- })
})
$.fn.addSelect2Options = function (data) {