Expose bigints as a column to do calculations on.

This commit is contained in:
Sam Rose 2024-10-25 11:53:27 +01:00
parent 7ee72b6c95
commit 5e4cfafa96
No known key found for this signature in database
1 changed files with 7 additions and 5 deletions

View File

@ -7,7 +7,12 @@
Icon, Icon,
Multiselect, Multiselect,
} from "@budibase/bbui" } from "@budibase/bbui"
import { CalculationType, canGroupBy, FieldType } from "@budibase/types" import {
CalculationType,
canGroupBy,
FieldType,
isNumeric,
} from "@budibase/types"
import InfoDisplay from "pages/builder/app/[application]/design/[screenId]/[componentId]/_components/Component/InfoDisplay.svelte" import InfoDisplay from "pages/builder/app/[application]/design/[screenId]/[componentId]/_components/Component/InfoDisplay.svelte"
import { getContext } from "svelte" import { getContext } from "svelte"
@ -90,10 +95,7 @@
return Object.entries(schema) return Object.entries(schema)
.filter(([field, fieldSchema]) => { .filter(([field, fieldSchema]) => {
// Only allow numeric fields that are not calculations themselves // Only allow numeric fields that are not calculations themselves
if ( if (fieldSchema.calculationType || !isNumeric(fieldSchema.type)) {
fieldSchema.calculationType ||
fieldSchema.type !== FieldType.NUMBER
) {
return false return false
} }
// Don't allow duplicates // Don't allow duplicates