Skip to content

Commit

Permalink
fix disabled select2 in boostrap modal
Browse files Browse the repository at this point in the history
  • Loading branch information
digitalfox committed Oct 8, 2023
1 parent 2d813de commit 2d7a601
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions templates/crm/client-popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,8 @@
$("#companyForm").show();
$("#company_input_group").hide();
{% endif %}
$(document).ready(function(){
// In bootstrap modal, we need to attach select2 to modal instead of body
$('.django-select2').djangoSelect2({ "theme": "bootstrap-5", "width": "auto", "dropdownParent": $('#clientModal')});
});
</script>

0 comments on commit 2d7a601

Please sign in to comment.