This commit is contained in:
mike12345567 2021-08-04 15:23:26 +01:00
parent 56cf236ebf
commit b01d50a81c
2 changed files with 15 additions and 12 deletions

View File

@ -26,17 +26,16 @@
)
$: fields =
viewTable &&
Object.keys(viewTable.schema).filter(
fieldName => {
const field = viewTable.schema[fieldName]
return field.type !== FIELDS.FORMULA.type && field.type !== FIELDS.LINK.type &&
(view.calculation === "count" ||
// don't want to perform calculations based on auto ID
(field.type === "number" &&
!field.autocolumn))
}
)
Object.keys(viewTable.schema).filter(fieldName => {
const field = viewTable.schema[fieldName]
return (
field.type !== FIELDS.FORMULA.type &&
field.type !== FIELDS.LINK.type &&
(view.calculation === "count" ||
// don't want to perform calculations based on auto ID
(field.type === "number" && !field.autocolumn))
)
})
function saveView() {
views.save(view)

View File

@ -11,7 +11,11 @@
$: fields =
viewTable &&
Object.entries(viewTable.schema)
.filter(entry => entry[1].type !== FIELDS.LINK.type && entry[1].type !== FIELDS.FORMULA.type)
.filter(
entry =>
entry[1].type !== FIELDS.LINK.type &&
entry[1].type !== FIELDS.FORMULA.type
)
.map(([key]) => key)
function saveView() {