jazzband / django-smart-selects

chained and grouped selects for django forms
https://django-smart-selects.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
1.1k stars 348 forks source link

Force to load select2 js first #273

Closed leibowitz closed 4 years ago

leibowitz commented 5 years ago

Fix the ManyToMany field when horizontal=True by making sure the SelectFilter2 is loaded first.

coveralls commented 5 years ago

Coverage Status

Coverage increased (+0.02%) to 89.831% when pulling b497d652244dd0e4935a16e37a0706f4fda0a94f on leibowitz:fix_bindfields_order into ca55e0bc8ad378dc7a3d1bb5e68e18e8fc51c546 on digi604:master.

manelclos commented 4 years ago

@leibowitz this makes sense, merging.

leibowitz commented 4 years ago

I just tested on the latest django (3.0.6), and this change seems to break the with ManyToMany and horizontal=True as it's not loading the data anymore. This seems to be because the .filtered class it not being searched for in bindfields.js Fix => https://github.com/jazzband/django-smart-selects/pull/298

The remaining issue I can see is horizontal=True is throwing an error (both with or without these two changes, so not related) which I will try to fix as well in another PR https://github.com/jazzband/django-smart-selects/issues/299