select2-bootstrap-5-theme icon indicating copy to clipboard operation
select2-bootstrap-5-theme copied to clipboard

Comatibility issue with Django-autocomplete-light. Clear button not appearing.

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

I don't know if this is select2-bootstrap-5-theme issue or django-autocomplete-light (DAL) issue so apologies in advance if it's unrelated.

I'm using select2 through DAL and applying this packages as select2 theme. As described here

autocomplete.ModelSelect2(
    url='<View url>',
    attrs={
        'data-theme': 'bootstrap-5',
        'data-allow-clear': True
    },
)

Theming works fine but clear button doesn't appear (In both RTL and LTR mode. I'm developing a RTL website). image If I remove 'data-theme', the button appears. I tried to set theme via JS, but no success. I checked the resulted Html and saw that <button> tag isn't even in generated Html so it's more likely DAL issue, but I don't have the required skill to debug it further.

Steps to reproduce: I created a sample repository. Just execute runserver command and go to default route

Alireza-Farahani avatar Jul 02 '22 15:07 Alireza-Farahani