Skip to content

Commit

Permalink
fix(relations): use form instead of hardcoding the id
Browse files Browse the repository at this point in the history
The dropdownParent setting defines where the autocomplete api call
results should be put in the DOM. Using the form as container we are
more flexible and can reuse the reinit_select2 event also for other
forms.
  • Loading branch information
b1rger committed Oct 8, 2024
1 parent fad4fd6 commit 08abeba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apis_core/relations/static/js/relation_dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ document.body.addEventListener("reinit_select2", function(evt) {
ajax: {
url: $(element).data("autocomplete-light-url"),
},
dropdownParent: $("#relationdialog"),
dropdownParent: $(form),
});
});
$('.select2-selection').addClass("form-control");
Expand Down

0 comments on commit 08abeba

Please sign in to comment.