Skip to content

Commit

Permalink
Fix #79 -- Clear values of related fields (#137)
Browse files Browse the repository at this point in the history

Co-authored-by: Kevin Ramirez <kevin.ramirez@mandarinprojects.mx>
  • Loading branch information
quevon24 and Kevin Ramirez authored Nov 3, 2022
1 parent 5a635fe commit d410f22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion django_select2/static/django_select2/django_select2.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
}
$element.on('select2:select', function (e) {
var name = $(e.currentTarget).attr('name')
$('[data-select2-dependent-fields=' + name + ']').each(function () {
$('[data-select2-dependent-fields~=' + name + ']').each(function () {
$(this).val('').trigger('change')
})
})
Expand Down

0 comments on commit d410f22

Please sign in to comment.