morlandi / django-ajax-datatable

A Django app which provides the integration of a Django project with the jQuery Javascript library DataTables.net
MIT License
215 stars 65 forks source link

Drop-down checkbox or method to display available values for a column #105

Open michaeldacanay opened 1 year ago

michaeldacanay commented 1 year ago

The column search filter has been good alternative to the default Django Admin list_filter, especially if you know what you are looking for. However, I was wondering if there was a way to view the set of values for a particular column? A similar issue I saw was #7 and am wondering if any progress was made on that. Thank you!

morlandi commented 1 year ago

Did you check this ?

https://github.com/morlandi/django-ajax-datatable#filtering-single-columns

michaeldacanay commented 1 year ago

Hi @morlandi, yes I found that after my post. I think it is a good step towards what I was looking for. I have a couple questions:

  1. Is there a way to have both a select menu and search box? So that the "select menu" filters based on what is typed in the search box? And you can still perform OR operations for search terms, if you want to view multiple values filtered?
  2. Currently, when I add a max_length, ellipses cut short the column values. Is there an option to view the whole value when hovering over in the select menu?
wilberninsiima commented 2 weeks ago

Hi @morlandi, yes I found that after my post. I think it is a good step towards what I was looking for. I have a couple questions:

  1. Is there a way to have both a select menu and search box? So that the "select menu" filters based on what is typed in the search box? And you can still perform OR operations for search terms, if you want to view multiple values filtered?
  2. Currently, when I add a max_length, ellipses cut short the column values. Is there an option to view the whole value when hovering over in the select menu?

In reference to question number 2, utilizing https://select2.org/ library would do the job. But the unfortunate part is that we have no capability to adjust the datatable input fields and selects classes of which we can target in JS. @morlandi you can do something on that Then also @morlandi can we have the max_length ellipsis affect data only in dropdowns not the full data rendered in the td?