Merge pull request #11211 from dataease/pr@dev-v2@fix_table_header_string_sort

fix(图表): 表格表头排序字符串类型字段排序错误
This commit is contained in:
wisonic-s
2024-07-29 11:07:17 +08:00
committed by GitHub

View File

@@ -37,12 +37,12 @@ const sortFunc = (sortParams: SortFuncParam) => {
if (typeof aValue === 'number') {
return aValue - bValue
}
return aValue < bValue ? 1 : -1
return aValue < bValue ? -1 : 1
}
if (typeof aValue === 'number') {
return bValue - aValue
}
return aValue > bValue ? 1 : -1
return aValue > bValue ? -1 : 1
})
}
const sort = (type?) => {