Skip to content

TypeScript question for buildProperty #489

Answered by fgatti675
LuLue7775 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, I think you can't have those dynamic names in FireCMS at this point:
A working solution would be:


type Client = {
    name: string;
    email: string;
    phone: string;
    uuid: string;
}
export type Order = {
    workshopOne: Client[];
}
const OrdersCollection = buildCollection<Order>({
    path: "orders",
    name: "Orders",
    properties: {
        workshopOne: buildProperty({
            name: "workshops",
            dataType: "array",
            of: {
                dataType: "reference",
                path: "client"
            }
        })
    }
})

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@LuLue7775
Comment options

Answer selected by LuLue7775
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants