mrts / django-admin-list-filter-dropdown

Use dropdowns in Django admin list filter
MIT License
315 stars 48 forks source link

min threshold #3

Closed TZanke closed 7 years ago

TZanke commented 7 years ago

Is it possible to add a threshold? So if the threshold is not reached, the list is displayed as django default?

Reason: Some Customers have 100 Objects, here the dropdown saves a lot of space. But others only have 5, where the Dropdown slows down the user.

mrts commented 7 years ago

There already is a threshold of "more than 4" to trigger the dropdown, see this line in the template. Does this satisfy your requirements?

TZanke commented 7 years ago

Nice. Never noticed it because there are always more then 4. For my use case, and a FullHD screen, i would prefer 10, but atm this is not a critical improvement.

Will keep this in mind if i need it customizeable.

mrts commented 7 years ago

OK, I will close this for now then. Please reopen if you think customization is important (and I would happily accept a pull request 😉).

beebek commented 7 years ago

Feature to customize the threshold value from settings would be great.

mrts commented 7 years ago

@beebek, pull requests welcome 😉