From 5a59a37a89c25a900a1ff72ff503b862b64088e7 Mon Sep 17 00:00:00 2001 From: Matthias Date: Fri, 20 Aug 2021 22:52:57 +0200 Subject: [PATCH] disable ordering on category --- InvenTree/templates/js/translated/part.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/InvenTree/templates/js/translated/part.js b/InvenTree/templates/js/translated/part.js index 4e663faaa9..937355250a 100644 --- a/InvenTree/templates/js/translated/part.js +++ b/InvenTree/templates/js/translated/part.js @@ -872,8 +872,7 @@ function loadPartTable(table, url, options={}) { } }); - columns.push({ - sortable: true, + col = { sortName: 'category', field: 'category_detail', title: '{% trans "Category" %}', @@ -885,7 +884,11 @@ function loadPartTable(table, url, options={}) { return '{% trans "No category" %}'; } } - }); + }; + if (!options.params.ordering) { + col['sortable'] = true; + }; + columns.push(col); columns.push({ field: 'in_stock',