Commit 352811b
As described in #249 and #297 django-select2 does not currently work
with selects added dynamically in the Django admin.
The solution was implemented in #249 and all credit should go to Jurrian
Tromp. I only added a small correction:
```diff
- jqRow.find('.select2-container').remove()
+ jqRow.find('.django-select2').parent().find('.select2-container').remove()
```
to only remove `.select2-container` when it is a sibling of
`.django-select2`. Otherwise the wrong `.select2-container` might get
deleted.
---------
Co-authored-by: Johannes Maron <[email protected]>
1 parent 12e2d60 commit 352811b
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
72 | 76 | | |
73 | 77 | | |
74 | 78 | | |
| |||
0 commit comments