diff --git a/django_select2/static/django_select2/django_select2.js b/django_select2/static/django_select2/django_select2.js index 01db20b5..935033d3 100644 --- a/django_select2/static/django_select2/django_select2.js +++ b/django_select2/static/django_select2/django_select2.js @@ -68,7 +68,11 @@ } $(function () { - $('.django-select2').djangoSelect2() + $('.django-select2').not('[name*=__prefix__]').djangoSelect2() + + document.addEventListener('formset:added', (event) => { + $(event.target).find('.django-select2').djangoSelect2() + }) }) return $.fn.djangoSelect2