Skip to content

Commit

Permalink
Merge pull request #359 from nortigo/master
Browse files Browse the repository at this point in the history
Fix row in formset event
  • Loading branch information
androettop authored Oct 30, 2024
2 parents 1f3ac7c + 16193ab commit 780c1df
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion smart_selects/static/smart-selects/admin/js/bindfields.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,11 @@
initItem(chained);
}

$(document).on('formset:added', function (event, $row, formsetName) {
$(document).on('formset:added', function (event, _row) {
// Fired every time a new inline formset is created

var chainedFK, chainedM2M, filteredM2M;
var $row = _row || $(event.target);

// For the ForeingKey
chainedFK = $row.find(".chained-fk");
Expand Down

0 comments on commit 780c1df

Please sign in to comment.