Skip to content

Commit

Permalink
fix(relations): display choices in create form
Browse files Browse the repository at this point in the history
narrowed selection of select elements to .listselect2
so that only autocomplete elements are reinitialised

fixes #1193
  • Loading branch information
gythaogg authored and b1rger committed Sep 18, 2024
1 parent 49c21bc commit bb66d57
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
});
document.body.addEventListener("reinit_select2", function(evt) {
form = document.getElementById(evt.detail.value);
form.querySelectorAll("select").forEach(element => {
form.querySelectorAll(".listselect2").forEach(element => {
$(element).select2({
ajax: {
url: $(element).data("autocomplete-light-url"),
Expand Down

0 comments on commit bb66d57

Please sign in to comment.