Not possible to add another filter in the popup
eriktelepovsky opened this issue · 1 comments
eriktelepovsky commented
Describe the bug
Not possible to add another filter field in the popup.
To Reproduce
Steps to reproduce the behavior:
- Go to 'model admin'
- Click on 'Advanced filter'
- Click on 'Add another filter'
- See error in the Javascript Console
Expected behavior
No error in the console and new field added.
Details (please complete the following information):
- OS: [doesn't matter, but tried both Mac and Debian]
- Python version [3.9.8]
- Django version [3.1.2]
- django-advanced-filters version [1.3.0]
- Browser [Chrome 96.0.4664.110, Safari 14.1.2]
- I don't use Grappelli
Additional context
JavaScript Console:
Possible fix
It works when I comment line 142 in advanced-filters.js
:
$('.form-row input.query-value').each(function() {
// $(this).select2("destroy");
});
asfaltboy commented
That's odd, haven't touched this code for a while... are you configuring your own version of select2 library in settings.SELECT2_JS
? If so, could you check which version you're using?