modlinltd / django-advanced-filters

Add advanced filtering abilities to Django admin
https://pypi.org/project/django-advanced-filters/
MIT License
771 stars 173 forks source link

The operator "One of" should allow multi-selection #20

Open asfaltboy opened 8 years ago

asfaltboy commented 8 years ago

We currently engage the prepopulated easy-select2 allowing only a single choice.

JVanloofsvelt commented 8 years ago

When I try the 'One of' in django 1.6, it selects the regex operator, is this the same problem you're having? You can check this in the console, the selected operator is logged.

asfaltboy commented 8 years ago

I think I meant this as more of an enhancement than a bug. The idea is that "one of" operator should (re-) initialize the select2 widget with the "multiple selection" option. E.g by calling select2 constructor with the multiple option:

input.select2({'data': data, 'multiple': true, 'createSearchChoice': function(term) {
  return { 'id': term, 'text': term }
}});