Fixed 'Part' column sorting

This commit is contained in:
eeintech 2020-10-01 11:05:08 -05:00
parent b7d25a75c4
commit 15e1c05791

View File

@ -168,7 +168,8 @@ function loadParametricPartTable(table, options={}) {
* *
* Args: * Args:
* - table: HTML reference to the table * - table: HTML reference to the table
* - data: Parameters data * - table_headers: Table headers/columns
* - table_data: Parameters data
*/ */
var table_headers = options.headers var table_headers = options.headers
@ -181,9 +182,10 @@ function loadParametricPartTable(table, options={}) {
for (header of table_headers) { for (header of table_headers) {
if (header === 'part') { if (header === 'part') {
columns.push({ columns.push({
field: 'part', field: header,
title: '{% trans 'Part' %}', title: '{% trans 'Part' %}',
sortable: true, sortable: true,
sortName: 'name',
formatter: function(value, row, index, field) { formatter: function(value, row, index, field) {
var name = ''; var name = '';