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 new settings to retrieve and display values and better highlighting of the selections #1

Open
wants to merge 6 commits into
base: feature/py3-improvements
Choose a base branch
from

Conversation

mrsarm
Copy link
Owner

@mrsarm mrsarm commented Feb 24, 2022

  • New setting lookup_field: allows to retrieve and store a different value than the pk of the foreign model: specially useful when used with the ArrayField field type (optional, default pk).
  • New setting load_on_empty: allows to load the first elements available when the input gets the focus, and it's empty (optional, disabled by default).
  • New option display_deleted: display elements in the "chips" section even if they were deleted from the "foreign" model (optional, default True).
  • Highlight the substrings in the filtered data that match the user input.

Until not merged upstream, it can be installed with:

$ pip install git+https://github.com/mrsarm/django-searchable-select.git@af194a86c1b4ece7e2424457a35d49dc40d9abda#egg=django-searchable-select

Or just add into the requirements.txt file: git+https://github.com/mrsarm/django-searchable-select.git@af194a86c1b4ece7e2424457a35d49dc40d9abda#egg=django-searchable-select.

* Allows to retrieve and store a different value than the pk of the foreign model.
* Specially useful when used with the ArrayField field type
* New setting load_on_empty that allows to load the first elements available when the input gets the focus, and it's empty (optional, disabled by default).
* Highlight the substrings in the filtered data that match the user input.
@mrsarm mrsarm changed the title Add "lookup_field" setting Add "lookup_field" and "load_on_empty" settings and better highlighting of the selections Feb 25, 2022
(Optional, default True) display elements in the "chips" section even if they were deleted from the "foreign" model.
@mrsarm mrsarm changed the title Add "lookup_field" and "load_on_empty" settings and better highlighting of the selections Add new settings to retrieve and display values and better highlighting of the selections Feb 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant