Fix header icon
This commit is contained in:
parent
9a6e6ed115
commit
dcc357f00a
|
@ -1,3 +1,4 @@
|
|||
import { BBReferenceFieldSubType, FieldType } from "@budibase/types"
|
||||
import { TypeIconMap } from "../../../constants"
|
||||
|
||||
export const getColor = (idx, opacity = 0.3) => {
|
||||
|
@ -11,7 +12,16 @@ export const getColumnIcon = column => {
|
|||
if (column.schema.autocolumn) {
|
||||
return "MagicWand"
|
||||
}
|
||||
const { type, subtype } = column.schema
|
||||
|
||||
const { type, subtype, constraints } = column.schema
|
||||
if (
|
||||
type === FieldType.BB_REFERENCE &&
|
||||
subtype === BBReferenceFieldSubType.USER &&
|
||||
constraints?.type !== "array"
|
||||
) {
|
||||
// This will handle old single users columns
|
||||
return "User"
|
||||
}
|
||||
|
||||
const result =
|
||||
typeof TypeIconMap[type] === "object" && subtype
|
||||
|
|
Loading…
Reference in New Issue