1
0
Fork 0
mirror of synced 2024-08-08 06:37:55 +12:00

Merge branch 'feature/multi-user-type-column' of github.com:Budibase/budibase into fix/external-table-keep-types

This commit is contained in:
mike12345567 2023-10-09 18:30:47 +01:00
commit fa5e340e60
2 changed files with 12 additions and 9 deletions

View file

@ -1,5 +1,6 @@
<script>
import { getContext, onMount, tick } from "svelte"
import { FieldType } from "@budibase/types"
import GridCell from "./GridCell.svelte"
import { Icon, Popover, Menu, MenuItem, clickOutside } from "@budibase/bbui"
import { getColumnIcon } from "../lib/utils"
@ -25,11 +26,12 @@
} = getContext("grid")
const bannedDisplayColumnTypes = [
"link",
"array",
"attachment",
"boolean",
"json",
FieldType.LINK,
FieldType.ARRAY,
FieldType.ATTACHMENT,
FieldType.BOOLEAN,
FieldType.JSON,
FieldType.BB_REFERENCE,
]
let anchor

View file

@ -219,10 +219,7 @@ export async function outputProcessing<T extends Row[] | Row>(
? await linkRows.attachFullLinkedDocs(table, safeRows)
: safeRows
// process formulas
enriched = processFormulas(table, enriched, { dynamic: true }) as Row[]
// set the attachments URLs
// process complex types: attachements, bb references...
for (let [property, column] of Object.entries(table.schema)) {
if (column.type === FieldTypes.ATTACHMENT) {
for (let row of enriched) {
@ -242,6 +239,10 @@ export async function outputProcessing<T extends Row[] | Row>(
}
}
}
// process formulas after the complex types had been processed
enriched = processFormulas(table, enriched, { dynamic: true }) as Row[]
if (opts.squash) {
enriched = (await linkRows.squashLinksToPrimaryDisplay(
table,