Remove Attachment and Signature from filters. Add _id support for DynamicFilter. Removed _rev from filters
This commit is contained in:
parent
5f0597deef
commit
ae4279bc58
|
@ -1,5 +1,5 @@
|
||||||
<script>
|
<script>
|
||||||
import { AbsTooltip, Icon, Body } from "@budibase/bbui"
|
import { Icon, Body, TooltipPosition, TooltipType } from "@budibase/bbui"
|
||||||
|
|
||||||
export let title
|
export let title
|
||||||
export let icon
|
export let icon
|
||||||
|
@ -18,6 +18,7 @@
|
||||||
export let closeButtonIcon = "Close"
|
export let closeButtonIcon = "Close"
|
||||||
export let noHeaderBorder = false
|
export let noHeaderBorder = false
|
||||||
export let titleCSS = true
|
export let titleCSS = true
|
||||||
|
|
||||||
$: customHeaderContent = $$slots["panel-header-content"]
|
$: customHeaderContent = $$slots["panel-header-content"]
|
||||||
$: customTitleContent = $$slots["panel-title-content"]
|
$: customTitleContent = $$slots["panel-title-content"]
|
||||||
</script>
|
</script>
|
||||||
|
@ -41,9 +42,12 @@
|
||||||
<Icon name="ArrowLeft" hoverable on:click={onClickBackButton} />
|
<Icon name="ArrowLeft" hoverable on:click={onClickBackButton} />
|
||||||
{/if}
|
{/if}
|
||||||
{#if icon}
|
{#if icon}
|
||||||
<AbsTooltip type="info" text={iconTooltip}>
|
<Icon
|
||||||
<Icon name={icon} />
|
name={icon}
|
||||||
</AbsTooltip>
|
tooltipType={TooltipType.Info}
|
||||||
|
tooltip={iconTooltip}
|
||||||
|
tooltipPosition={TooltipPosition.Top}
|
||||||
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
<div class:title={titleCSS}>
|
<div class:title={titleCSS}>
|
||||||
{#if customTitleContent}
|
{#if customTitleContent}
|
||||||
|
|
|
@ -299,15 +299,6 @@ export const PaginationLocations = [
|
||||||
{ label: "Request body", value: "body" },
|
{ label: "Request body", value: "body" },
|
||||||
]
|
]
|
||||||
|
|
||||||
export const BannedSearchTypes = [
|
|
||||||
FieldType.LINK,
|
|
||||||
FieldType.ATTACHMENTS,
|
|
||||||
FieldType.FORMULA,
|
|
||||||
FieldType.JSON,
|
|
||||||
"jsonarray",
|
|
||||||
"queryarray",
|
|
||||||
]
|
|
||||||
|
|
||||||
export const DatasourceTypes = {
|
export const DatasourceTypes = {
|
||||||
RELATIONAL: "Relational",
|
RELATIONAL: "Relational",
|
||||||
NON_RELATIONAL: "Non-relational",
|
NON_RELATIONAL: "Non-relational",
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
import { getContext, onDestroy } from "svelte"
|
import { getContext, onDestroy } from "svelte"
|
||||||
import { ModalContent, Modal } from "@budibase/bbui"
|
import { ModalContent, Modal } from "@budibase/bbui"
|
||||||
import FilterModal from "./FilterModal.svelte"
|
import FilterModal from "./FilterModal.svelte"
|
||||||
import { QueryUtils } from "@budibase/frontend-core"
|
import { QueryUtils, Constants } from "@budibase/frontend-core"
|
||||||
import Button from "../Button.svelte"
|
import Button from "../Button.svelte"
|
||||||
|
|
||||||
export let dataProvider
|
export let dataProvider
|
||||||
|
@ -69,7 +69,10 @@
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
return Object.values(clonedSchema || {})
|
return Object.values(clonedSchema || {})
|
||||||
|
.filter(field => !Constants.BannedSearchTypes.includes(field.type))
|
||||||
|
.concat([{ name: "_id", type: "string" }])
|
||||||
}
|
}
|
||||||
|
|
||||||
const openEditor = () => {
|
const openEditor = () => {
|
||||||
|
@ -94,7 +97,7 @@
|
||||||
onClick={openEditor}
|
onClick={openEditor}
|
||||||
icon="ri-filter-3-line"
|
icon="ri-filter-3-line"
|
||||||
text="Filter"
|
text="Filter"
|
||||||
size="XL"
|
{size}
|
||||||
type="secondary"
|
type="secondary"
|
||||||
quiet
|
quiet
|
||||||
active={filters?.length > 0}
|
active={filters?.length > 0}
|
||||||
|
|
|
@ -36,11 +36,7 @@
|
||||||
) &&
|
) &&
|
||||||
!schemaFields.some(field => field.name === "_id")
|
!schemaFields.some(field => field.name === "_id")
|
||||||
) {
|
) {
|
||||||
schemaFields = [
|
schemaFields = [...schemaFields, { name: "_id", type: "string" }]
|
||||||
...schemaFields,
|
|
||||||
{ name: "_id", type: "string" },
|
|
||||||
{ name: "_rev", type: "string" },
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,8 @@ export const BannedSearchTypes = [
|
||||||
FieldType.ATTACHMENTS,
|
FieldType.ATTACHMENTS,
|
||||||
FieldType.FORMULA,
|
FieldType.FORMULA,
|
||||||
FieldType.JSON,
|
FieldType.JSON,
|
||||||
|
FieldType.ATTACHMENT_SINGLE,
|
||||||
|
FieldType.SIGNATURE_SINGLE,
|
||||||
"jsonarray",
|
"jsonarray",
|
||||||
"queryarray",
|
"queryarray",
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue