From 5e4cfafa9620b83c7f1b3bb33b8655d497a9a044 Mon Sep 17 00:00:00 2001 From: Sam Rose Date: Fri, 25 Oct 2024 11:53:27 +0100 Subject: [PATCH] Expose bigints as a column to do calculations on. --- .../buttons/grid/GridViewCalculationButton.svelte | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/builder/src/components/backend/DataTable/buttons/grid/GridViewCalculationButton.svelte b/packages/builder/src/components/backend/DataTable/buttons/grid/GridViewCalculationButton.svelte index 72216f3b3b..db58ba4a8f 100644 --- a/packages/builder/src/components/backend/DataTable/buttons/grid/GridViewCalculationButton.svelte +++ b/packages/builder/src/components/backend/DataTable/buttons/grid/GridViewCalculationButton.svelte @@ -7,7 +7,12 @@ Icon, Multiselect, } 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 { getContext } from "svelte" @@ -90,10 +95,7 @@ return Object.entries(schema) .filter(([field, fieldSchema]) => { // Only allow numeric fields that are not calculations themselves - if ( - fieldSchema.calculationType || - fieldSchema.type !== FieldType.NUMBER - ) { + if (fieldSchema.calculationType || !isNumeric(fieldSchema.type)) { return false } // Don't allow duplicates