Generalised the fix as not all calculations will have a groupby per PR feedback
This commit is contained in:
parent
66fda3db09
commit
b952892c42
|
@ -28,7 +28,9 @@
|
|||
|
||||
$: if (schema) {
|
||||
parsedSchema = Object.keys(schema).reduce((acc, key) => {
|
||||
acc[key] = { ...schema[key] }
|
||||
acc[key] =
|
||||
typeof schema[key] === "string" ? { type: schema[key] } : schema[key]
|
||||
|
||||
if (!canBeSortColumn(acc[key].type)) {
|
||||
acc[key].sortable = false
|
||||
}
|
||||
|
|
|
@ -19,21 +19,8 @@
|
|||
let loading = false
|
||||
let type = "internal"
|
||||
|
||||
// Grouped views have a fixed schema layout
|
||||
const parseSchema = view => {
|
||||
if (!view.groupBy) {
|
||||
return view.schema
|
||||
}
|
||||
const { group, field, value } = view.schema
|
||||
return {
|
||||
group,
|
||||
field: { type: field },
|
||||
value: { type: value },
|
||||
}
|
||||
}
|
||||
|
||||
$: name = view.name
|
||||
$: schema = parseSchema(view)
|
||||
$: schema = view.schema
|
||||
$: calculation = view.calculation
|
||||
|
||||
$: supportedFormats = Object.values(ROW_EXPORT_FORMATS).filter(key => {
|
||||
|
|
Loading…
Reference in New Issue