django-select2 icon indicating copy to clipboard operation
django-select2 copied to clipboard

🐛 Search Field of Select2Multiple are bugged

Open RitchiS99 opened this issue 1 year ago • 3 comments

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

RitchiS99 avatar Aug 30 '24 08:08 RitchiS99

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

codingjoe avatar Aug 30 '24 11:08 codingjoe

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

RitchiS99 avatar Aug 30 '24 12:08 RitchiS99

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

codingjoe avatar Sep 26 '24 15:09 codingjoe