Don't allow selecting unvalid display columns

This commit is contained in:
Adria Navarro 2023-10-10 16:13:21 +02:00
parent 31469cb2d6
commit 6124139295
1 changed files with 2 additions and 1 deletions

View File

@ -3,6 +3,7 @@
import { FIELDS } from "constants/backend" import { FIELDS } from "constants/backend"
import { API } from "api" import { API } from "api"
import { parseFile } from "./utils" import { parseFile } from "./utils"
import { canBeDisplayColumn } from "@budibase/shared-core"
export let rows = [] export let rows = []
export let schema = {} export let schema = {}
@ -97,7 +98,7 @@
let selectedColumnTypes = {} let selectedColumnTypes = {}
$: displayColumnOptions = Object.keys(schema || {}).filter(column => { $: displayColumnOptions = Object.keys(schema || {}).filter(column => {
return validation[column] return validation[column] && canBeDisplayColumn(schema[column].type)
}) })
$: { $: {