forked from github/dataease
Merge pull request #7922 from dataease/pr@dev-v2@fix_pivot_null_main_dimension_sort
fix(视图-透视表): 修复主维度为空时使用排序导致视图渲染失败
This commit is contained in:
commit
7c7d38be24
@ -319,13 +319,13 @@ function customCalcFunc(query, data, totalCfgMap) {
|
||||
const result = minBy(data, n => {
|
||||
return n[query[EXTRA_FIELD]]
|
||||
})
|
||||
return result[query[EXTRA_FIELD]]
|
||||
return result?.[query[EXTRA_FIELD]]
|
||||
}
|
||||
case 'MAX': {
|
||||
const result = maxBy(data, n => {
|
||||
return n[query[EXTRA_FIELD]]
|
||||
})
|
||||
return result[query[EXTRA_FIELD]]
|
||||
return result?.[query[EXTRA_FIELD]]
|
||||
}
|
||||
default: {
|
||||
return data.reduce((p, n) => {
|
||||
|
Loading…
Reference in New Issue
Block a user