deschler / django-modeltranslation

Translates Django models using a registration approach.
BSD 3-Clause "New" or "Revised" License
1.34k stars 257 forks source link

Fire event when JS is initiated #714

Open adi- opened 6 months ago

adi- commented 6 months ago

When all translation inputs are initiated it would be nice to fire an event. I am manipulating form inputs (setting custom height), but I am having a race condition. My script is run when DOM is loaded, same with django-modeltranslation JS scripts. My manipulation script sometimes can't see those form inputs, because of not finished django-translation scripts.

Any chance to do so?

last-partizan commented 6 months ago

Sure. Please take a look at JS code and make a PR with this event you need.

I can do code review and merge it.