diff --git a/InvenTree/InvenTree/static/script/inventree/filters.js b/InvenTree/InvenTree/static/script/inventree/filters.js index 8c9ebbec6d..3209ba3beb 100644 --- a/InvenTree/InvenTree/static/script/inventree/filters.js +++ b/InvenTree/InvenTree/static/script/inventree/filters.js @@ -272,8 +272,9 @@ function setupFilterList(tableKey, table, target) { for (var key in filters) { var value = getFilterOptionValue(tableKey, key, filters[key]); var title = getFilterTitle(tableKey, key); + var description = getFilterDescription(tableKey, key); - element.append(`
${title} = ${value}x
`); + element.append(`
${title} = ${value}x
`); } // Add a callback for adding a new filter @@ -362,6 +363,15 @@ function getFilterTitle(tableKey, filterKey) { } +/** + * Return the pretty description for the given table and filter selection + */ +function getFilterDescription(tableKey, filterKey) { + var settings = getFilterSettings(tableKey, filterKey); + + return settings.title; +} + /* * Return a description for the given table and filter selection. */