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