I am using the django-ajax-select library to display a many to many relationship in the admin panel. The problem is that I have too many objects linked and it is making super long page.
Do you know if is there any way I can customize that element so it can have some kind of scrollbar or pagination?
Here is an example illustrating the problem: Image link
And this is how I added the element to the admin panel:
form = make_ajax_form(
MainClass,
{
"users": "user", # LookupChannel is registered as user
"admins": "user",
},
)
answer is on the first page of the django-ajax-select
https://django-ajax-selects.readthedocs.io/en/latest/
you should override get_query like this:
your_search_limit - the length of the list you want to get.