diff --git a/packages/builder/src/components/design/Panel.svelte b/packages/builder/src/components/design/Panel.svelte index 331908ca8b..72d39555ab 100644 --- a/packages/builder/src/components/design/Panel.svelte +++ b/packages/builder/src/components/design/Panel.svelte @@ -1,5 +1,5 @@ @@ -41,9 +42,12 @@ {/if} {#if icon} - - - + {/if}
{#if customTitleContent} diff --git a/packages/builder/src/constants/backend/index.js b/packages/builder/src/constants/backend/index.js index 78e90d6298..ea8d35704f 100644 --- a/packages/builder/src/constants/backend/index.js +++ b/packages/builder/src/constants/backend/index.js @@ -299,15 +299,6 @@ export const PaginationLocations = [ { label: "Request body", value: "body" }, ] -export const BannedSearchTypes = [ - FieldType.LINK, - FieldType.ATTACHMENTS, - FieldType.FORMULA, - FieldType.JSON, - "jsonarray", - "queryarray", -] - export const DatasourceTypes = { RELATIONAL: "Relational", NON_RELATIONAL: "Non-relational", diff --git a/packages/client/src/components/app/dynamic-filter/DynamicFilter.svelte b/packages/client/src/components/app/dynamic-filter/DynamicFilter.svelte index 12a5886dec..b4c69d2555 100644 --- a/packages/client/src/components/app/dynamic-filter/DynamicFilter.svelte +++ b/packages/client/src/components/app/dynamic-filter/DynamicFilter.svelte @@ -3,7 +3,7 @@ import { getContext, onDestroy } from "svelte" import { ModalContent, Modal } from "@budibase/bbui" import FilterModal from "./FilterModal.svelte" - import { QueryUtils } from "@budibase/frontend-core" + import { QueryUtils, Constants } from "@budibase/frontend-core" import Button from "../Button.svelte" export let dataProvider @@ -69,7 +69,10 @@ } }) } + return Object.values(clonedSchema || {}) + .filter(field => !Constants.BannedSearchTypes.includes(field.type)) + .concat([{ name: "_id", type: "string" }]) } const openEditor = () => { @@ -94,7 +97,7 @@ onClick={openEditor} icon="ri-filter-3-line" text="Filter" - size="XL" + {size} type="secondary" quiet active={filters?.length > 0} diff --git a/packages/frontend-core/src/components/FilterBuilder.svelte b/packages/frontend-core/src/components/FilterBuilder.svelte index 5b6b6b4c86..059eae1a48 100644 --- a/packages/frontend-core/src/components/FilterBuilder.svelte +++ b/packages/frontend-core/src/components/FilterBuilder.svelte @@ -36,11 +36,7 @@ ) && !schemaFields.some(field => field.name === "_id") ) { - schemaFields = [ - ...schemaFields, - { name: "_id", type: "string" }, - { name: "_rev", type: "string" }, - ] + schemaFields = [...schemaFields, { name: "_id", type: "string" }] } } diff --git a/packages/frontend-core/src/constants.js b/packages/frontend-core/src/constants.js index e5869a3b98..8dc0b41375 100644 --- a/packages/frontend-core/src/constants.js +++ b/packages/frontend-core/src/constants.js @@ -15,6 +15,8 @@ export const BannedSearchTypes = [ FieldType.ATTACHMENTS, FieldType.FORMULA, FieldType.JSON, + FieldType.ATTACHMENT_SINGLE, + FieldType.SIGNATURE_SINGLE, "jsonarray", "queryarray", ]