From 15e1c0579125032bc4990915cc29bfa853a5a40f Mon Sep 17 00:00:00 2001 From: eeintech Date: Thu, 1 Oct 2020 11:05:08 -0500 Subject: [PATCH] Fixed 'Part' column sorting --- InvenTree/templates/js/part.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/InvenTree/templates/js/part.html b/InvenTree/templates/js/part.html index 59406e7672..bbdca8f8c4 100644 --- a/InvenTree/templates/js/part.html +++ b/InvenTree/templates/js/part.html @@ -168,7 +168,8 @@ function loadParametricPartTable(table, options={}) { * * Args: * - table: HTML reference to the table - * - data: Parameters data + * - table_headers: Table headers/columns + * - table_data: Parameters data */ var table_headers = options.headers @@ -181,9 +182,10 @@ function loadParametricPartTable(table, options={}) { for (header of table_headers) { if (header === 'part') { columns.push({ - field: 'part', + field: header, title: '{% trans 'Part' %}', sortable: true, + sortName: 'name', formatter: function(value, row, index, field) { var name = '';