Replies: 1 comment 5 replies
-
Hi @rez0n, |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Problem
Using django-select2 fields in Bootstrap modal (provided by django-bootstrap-modal-forms) I faced with issue that first time you open modal it can't initialize select2 inputs due to DOM is not ready.
Browser console log looks like
Code Snippet
Modal initiator (
/documents/63
) pageModal content (
/documents/63/attach/
)I assume the main issue that is django-select2 initialize inputs before it was loaded. I applied a workaround to re-initialize inputs in 100ms after the modal opens, it works correctly but I have an error in the console on each first modal open.
Any suggestions to get it works correctly in the modal?
Beta Was this translation helpful? Give feedback.
All reactions