Make collection titles searchable in table

This commit is contained in:
JonnyWong16 2020-10-01 19:43:10 -07:00
parent 72215a9f44
commit 0ba755e463
No known key found for this signature in database
GPG key ID: B1F1F9807184697A
3 changed files with 9 additions and 4 deletions

View file

@ -201,6 +201,8 @@ def get_collections_list(section_id=None, **kwargs):
# Get datatables JSON data
json_data = helpers.process_json_kwargs(json_kwargs=kwargs['json_data'])
search_cols = ['title']
sort_keys = {
'collectionMode': {
-1: 'Library Default',
@ -215,7 +217,8 @@ def get_collections_list(section_id=None, **kwargs):
}
results = helpers.process_datatable_rows(
collections, json_data, default_sort='titleSort', sort_keys=sort_keys)
collections, json_data, default_sort='titleSort',
search_cols=search_cols, sort_keys=sort_keys)
data = {
'recordsFiltered': results['filtered_count'],