Skip to content

Commit

Permalink
Merge pull request #12003 from Budibase/fix/use-user-table-as-display…
Browse files Browse the repository at this point in the history
…-column

Ban user column to be used as display column
  • Loading branch information
adrinr authored Oct 9, 2023
2 parents 6a39eb6 + 6c8c0b6 commit 6987d42
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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
Expand Down
9 changes: 5 additions & 4 deletions packages/server/src/utilities/rowProcessor/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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,
Expand Down

0 comments on commit 6987d42

Please sign in to comment.