django-autocomplete-light icon indicating copy to clipboard operation
django-autocomplete-light copied to clipboard

Incompatibility with select2-bootstrap-5-theme. Clear button not appearing.

Open Alireza-Farahani opened this issue 3 years ago • 0 comments
trafficstars

When using select2-bootstrap-5-theme package for theming, clear button doesn't appear. This is clearly a compatibility issue between these two package since DAL in isolation works fine and same for select2-bootstrap-5. I don't know if it's DAL issue or select2-bootstrap-5 issue so I created a issue there too.

Steps to reproduce:

  1. Setup DAL in a new Django project.
  2. Add select2-bootstrap-5 css.
  3. Set "data-bootstrap-5" and "data-allow-clear" in widget's data attributes.
autocomplete.ModelSelect2(
    url='<View url>',
    attrs={
        'data-theme': 'bootstrap-5',
        'data-allow-clear': True
    },
)

image

I created a sample repository that shows the issue.

Alireza-Farahani avatar Jul 03 '22 07:07 Alireza-Farahani