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

🐛 Issues with django admin inline

Open sahilasopa opened this issue 1 year ago • 2 comments

Bug Description

There has been this long and everlasting problem of using Django admin inline with a select2 widget, hours of browsing through stack-overflow and Github issues led me to nowhere.

The bug is: Select2 Dropdown does not work when you add new inlines (works perfectly for existing inlines), I specifically faced this bug in Django admin

Steps to Reproduce

  1. Use a select2 widget on Django admin (link the admin via model form) the widget I used was HeavySelect2Widget
  2. click on add inline
  3. try to click on the dropdown widget and see NOTHING HAPPEN

Expected Behavior

It's expected to see a dropdown

sahilasopa avatar Aug 27 '24 17:08 sahilasopa

the issue has been mentioned in #249 too

sahilasopa avatar Aug 27 '24 18:08 sahilasopa

@sahilasopa I just submitted a PR that fixes this issue using the solution from #249 plus a small contribution of mine. Hopefully it will be merged soon. In the meantime you can try it yourself using the standard Django mechanism for overriding static files or templates.

mardukbp avatar Sep 16 '24 13:09 mardukbp