Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backend, problem with multiple "select2" #1996

Closed
oeN opened this issue Jun 6, 2017 · 2 comments
Closed

Backend, problem with multiple "select2" #1996

oeN opened this issue Jun 6, 2017 · 2 comments

Comments

@oeN
Copy link

oeN commented Jun 6, 2017

Steps to reproduce

  • Add a filter with a select box (with the select2 class) in the products index
  • Click on the "New Product" button

Expected behavior

  • filters panel is hidden
  • Shipping Category and Tax Category are styled correctly with select2

Actual behavior

  • filters panel is still visible
  • Shipping Category and Tax Category are not styled

System configuration

ruby 2.4

gem 'solidus', github: 'solidusio/solidus', branch: 'master'

Extensions in use:

gem 'solidus_auth_devise'
gem 'solidus_i18n', github: 'solidusio-contrib/solidus_i18n', branch: 'master'
gem 'globalize', github: 'globalize/globalize'
gem 'solidus_social', github: 'solidusio-contrib/solidus_social'
gem 'solidus_editor', github: 'solidusio-contrib/solidus_editor', branch: 'master'
gem 'solidus_paypal_braintree', github: 'solidusio/solidus_paypal_braintree'
gem 'solidus_globalize', github: 'solidusio-contrib/solidus_globalize'
@oeN
Copy link
Author

oeN commented Jun 6, 2017

The problem is related to select2/select2#2750

We need to change the way solidus init the select2().
To solve this specific problem is enough to override the backend/app/views/spree/admin/products/new.js.erb and change $('.select2').select2(); to $('select.select2').select2();

I am changing all the points where solidus uses $('.select2').select2(); to $('select.select2').select2(); and then I'll open a PR

@jhawthorn
Copy link
Contributor

Fixed by #1997

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants