codingjoe / django-select2

This is a Django integration for Select2
https://django-select2.rtfd.io
MIT License
169 stars 52 forks source link

🐛 Search Field of Select2Multiple are bugged #298

Open RitchiS99 opened 1 month ago

RitchiS99 commented 1 month ago

Bug Description

When I am adding a Select2MultipleWidget in a django-filters form, the search field is moved down, so it isn't in the select-box as expected. Hapenning with Standard theme and with select2-bootstrap-5 theme. Form is added with crispy forms.

image

Steps to Reproduce

  1. Add Select2MultipleWidget in a django-filters form.
  2. Include the filter-form with crispy forms.
  3. Watch the broken search field of Select2MultipleWidget

Expected Behavior

The search field shall look like this image

codingjoe commented 1 month ago

Hi @RitchiS99,

Thank you for reaching out. However, this package merely does the Django integration and provides no alterations to the CSS code. Might I suggest reaching out to the team that maintains the Select2 page here: https://github.com/select2/select2/

Best Joe

RitchiS99 commented 1 month ago

Hi Joe, the problem is, that the issue is only happening with django-select2 and not with normal select2 like you can see in the picture. I just let the fields the same and just change the call from

$(.django-select2).djangoSelect2(){}

to

$(.django-select2.).select2(){}

So the problem seems to be because of django-select2

codingjoe commented 3 weeks ago

Huh, interesting. Do you have any further information to go on or a sample project we could use to debug this issue further? Best, Joe