Replies: 1 comment 2 replies
-
Hi @NewSoupVi, Thanks for reaching out. I believe this issue isn't related to the Django implementation, but rather to the JS package. You might have better luck reaching out to the Select2 community, over here: https://github.com/select2/select2 Please let me know if there is anything else we can help you with. Cheers, |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Bug Description
This is a known issue with a suggested fix: https://select2.org/troubleshooting/common-problems
The suggested fix is quite annoying with django-select2 though, since we don't make the select elements ourselves. We've had to resort to using a "general fix" like this:
But this is quite error prone itself and feels more like taking a crowbar to the issue.
Steps to Reproduce
Make a modal that has a django-select2 select element as its child, and that opens with an
<a>
usingdata-bs-target
.<a href="#" data-bs-target="#myModal" data-bs-toggle="modal">
{% include "snippets/modals/myModal.html" with modalname="myModal" %}
And then inside of that
myModal.html
, we have{{ myModalForm.mySelectionElement }}
<- select elementExpected Behavior
I expected the select element to display above the modal.
Beta Was this translation helpful? Give feedback.
All reactions