Filtering by license category
Opened this issue · 3 comments
We need a filtering feature for the license list view, this could help looking up licenses for a particular category.
Alternatively it could also help if the search supported searching in specific license attributes, i.e. search by category/name/license-key. This is related to #16
@AyanSinhaMahapatra you can already filter by category by clicking on any category labels from the category column.
Alternatively it could also help if the search supported searching in specific license attributes, i.e. search by category/name/license-key
The search is already looking into all those attribute, this is actually how the category filtering is currently implemented.
Yes but these is not limited to just the category field: see https://scancode-licensedb.aboutcode.org/?search=CLA it searches across all the attributes, which does not give us just the licenses with category CLA.
Maybe there should be a drop down beside the search only for specific attributes, or globally, and then pull up search results based on that?
Currently for querying the Datatable in scancode-toolkit\src\licensedcode\templates\license_list.html we have :
table.search().draw() function in js which queries the entire datatable.
So to apply the search only on category coulmn we can have:
table.columns([3]).search().draw()
However, I think this is a temporary solution because then if a user wants to apply the search on other columns instead of category then we have to again change the columns() argument.
I agree the idea of displaying a drop-down box beside the search bar so that the user can choose the column he want to apply his search for.