Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a possibility to have case-sensitive creates using Select2QuerySetView #1253

Merged
merged 1 commit into from
Sep 1, 2021

Conversation

shenek
Copy link
Contributor

@shenek shenek commented Jul 26, 2021

Sometimes it desired to have a possibility to create case-sensitive options Select2QuerySetView.

For example image a situation when you are trying to use Select2QuerySetView to choose a unit (e.g. file size).
These units are case-sensitive MB vs Mb. In current implementation it is not possible to create both Mb and MB in the search field.

This patch makes it easier to achieve such functionality by overriding Select2QuerySetView.

class CustomSelect2QuerySetView(Select2QuerySetView):
    case_sensitive_create = True

@jpic jpic merged commit 925bed8 into yourlabs:master Sep 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants