wagtail / wagtail-generic-chooser

A toolkit for custom chooser popups in Wagtail
BSD 3-Clause "New" or "Revised" License
116 stars 25 forks source link

Searching in ModelChooserMixin could use autocomplete instead of search #80

Closed bmihelac closed 9 months ago

bmihelac commented 9 months ago

Hi all,

Apologies if this has been discussed before or if it is not meaningful because this library supports multiple Wagtail versions.

Searching in ModelChooserMixin is currently done using the search_backend.search(search_term, object_list). link. It might be useful to default to autocomplete, if available, similar to how Wagtail does for its built-in choosers, such as Images.

For reference, here is the Wagtail code: https://github.com/wagtail/wagtail/blob/a80c7ca60eccf9df60f90d3f10da2d506776c13d/wagtail/admin/forms/choosers.py#L81-L94

gasman commented 9 months ago

Thanks for the report @bmihelac! Now that Wagtail's own ChooserViewSet is feature-complete with wagtail-generic-chooser's feature set, it's unlikely that we'll be developing it further to take advantage of other Wagtail enhancements (such as the work to make autocompletion search consistent across all backends in 5.1). I'll update the readme to clarify this.

bmihelac commented 9 months ago

Thanks for the info @gasman, I did not know that.