Skip to content
代码片段 群组 项目
提交 bab3ca3a 编辑于 作者: Thuc Tran's avatar Thuc Tran
浏览文件

ZAPP-388 Have attributes be sortable by label

上级 a8537907
No related branches found
No related tags found
无相关合并请求
......@@ -410,9 +410,12 @@ export default {
data.sort((a, b) => {
const x = descending ? b : a
const y = descending ? a : b
if (sortBy === 'attrName') {
return x[sortBy] > y[sortBy] ? 1 : x[sortBy] < y[sortBy] ? -1 : 0
return x['label'].toLowerCase() > y['label'].toLowerCase()
? 1
: x['label'].toLowerCase() < y['label'].toLowerCase()
? -1
: 0
} else if (sortBy === 'attrID' || sortBy === 'mfgId') {
if (x['manufacturerCode'] == y['manufacturerCode']) {
return x['code'] > y['code'] ? 1 : x['code'] < y['code'] ? -1 : 0
......@@ -536,12 +539,14 @@ export default {
label: 'Required',
field: 'required',
align: 'left',
sortable: true,
},
{
name: 'clientServer',
label: 'Client/Server',
field: 'clientServer',
align: 'left',
sortable: true,
},
{
name: 'mfgID',
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册