yourlabs / django-autocomplete-light

A fresh approach to autocomplete implementations, specially for Django. Status: v4 alpha, v3 stable, v2 & v1 deprecated.
https://django-autocomplete-light.readthedocs.io
MIT License
1.81k stars 468 forks source link

Bootstrap modal with remote url and DAL #1238

Open gabn88 opened 3 years ago

gabn88 commented 3 years ago

Getting DAL to work with the bootstrap modal that loads the "registerfunction" script with the remote url is problematic with the new release. I though I had it working, but it seems that whether it works depends on, amongst other things, the internet speed, which is undesirable.

The problem is that the registerfunction could be called before the modal is ready, but after yl is defined. That way the select2 is not even initialized, because the function already is in the yl.functions (which is global in scope), but not initialized on the current (new) modal.

jpic commented 3 years ago

Can you reproduce in a test app in the test project so that we can take a look?

OmarAboulMakarem commented 2 years ago

+1