Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(relations): refactor js and add it to forms Media class #1545

Merged
merged 1 commit into from
Jan 23, 2025

Conversation

b1rger
Copy link
Contributor

@b1rger b1rger commented Jan 22, 2025

The reinit_select2 functionality is now in a separate
rel_reinit_select2 function which is run every time the js is included
and when the reinit_select2 trigger is received (though not sure if
thats even needed now).
In addition the javascript is included in the relation forms Media
class, so that the js is included with every relation form and thus the
rel_reinit_select2 function is executed everytime the form in loaded
which is what we actually want to make the select2 work everytime.

Closes: #1544

@b1rger b1rger marked this pull request as ready for review January 23, 2025 08:15
The reinit_select2 functionality is now in a separate
`rel_reinit_select2` function which is run every time the js is included
*and* when the `reinit_select2` trigger is received (though not sure if
thats even needed now).
In addition the javascript is included in the relation forms Media
class, so that the js is included with every relation form and thus the
`rel_reinit_select2` function is executed everytime the form in loaded
which is what we actually want to make the select2 work everytime.

Closes: #1544
@b1rger b1rger force-pushed the birger/1544-rel-dialog-select2 branch from 7393678 to 5bc4f08 Compare January 23, 2025 08:18
@b1rger b1rger merged commit 5e4a9c0 into main Jan 23, 2025
14 checks passed
@b1rger b1rger deleted the birger/1544-rel-dialog-select2 branch January 23, 2025 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Select2 doesn't initialze in relation modal on first open
1 participant