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 row in formset event #359

Merged
merged 2 commits into from
Oct 30, 2024
Merged

Fix row in formset event #359

merged 2 commits into from
Oct 30, 2024

Conversation

nortigo
Copy link
Contributor

@nortigo nortigo commented Sep 9, 2024

I upgraded to Django 4.2+ a project that uses django-smart-selects and I noticed an error from binfields.js.

After investigating, I found that Django 4.1 removed $row and formsetName parameters.

Changed in Django 4.1:
In older versions, the event was a jQuery event with $row and formsetName parameters. It is now a JavaScript CustomEvent with parameters set in event.detail.

Source : https://docs.djangoproject.com/en/4.2/ref/contrib/admin/javascript/#inline-form-events

@androettop
Copy link
Contributor

Having the same problem, the proposed solution LGTM

Copy link
Contributor

@androettop androettop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think also this change should be added @nortigo

smart_selects/static/smart-selects/admin/js/bindfields.js Outdated Show resolved Hide resolved
@androettop androettop merged commit 780c1df into jazzband:master Oct 30, 2024
31 checks passed
@androettop
Copy link
Contributor

@digi604 @manelclos Can we make a release for this?

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.

2 participants