Admin raw_id_fields should trigger javascript change event

198 views
Skip to first unread message

Federico Capoano

unread,
Sep 30, 2017, 12:38:22 PM9/30/17
to Django developers (Contributions to Django itself)
Hi everyone,

I have a raw_id_field in the admin and I need to trigger some javascript logic when it's value is filled by the user through the popup, but unfortunately I found out that when the popup is closed and the value is filled into the field the change event is not fired.

I found this quite surprising!

After looking for a solution and digging, I found a workaround which I tested and ensured works:

I was wondering: why don't we include the change event trigger into django itself instead of requiring django users to add this sort of hacks in their code?
This is an easy and low risk fix. Is there already an issue for this? I volunteer to do this.

Thanks
Federico
Reply all
Reply to author
Forward
0 new messages