Skip to content

Commit 16193ab

Browse files
nortigoandroettop
andauthored
Update smart_selects/static/smart-selects/admin/js/bindfields.js
Co-authored-by: Pablo Androetto <androettop@gmail.com>
1 parent 1c39a63 commit 16193ab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

smart_selects/static/smart-selects/admin/js/bindfields.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@
6161
initItem(chained);
6262
}
6363

64-
$(document).on('formset:added', function (event) {
64+
$(document).on('formset:added', function (event, _row) {
6565
// Fired every time a new inline formset is created
6666

6767
var chainedFK, chainedM2M, filteredM2M;
68-
var $row = $(event.target);
68+
var $row = _row || $(event.target);
6969

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

0 commit comments

Comments
 (0)