Hi,
I need to pass this type to a choice from the React app, but not sure how to specify a default value. I’m using the daml-ui-template.
data Participant = Participant
with
name : Text
deriving (Eq, Show)
The choice is:
nonconsuming CreateParticipant: ContractId ParticipantRole
with
participant : Party
participantInfo: Participant
do
create ParticipantRole with ..
I can’t figure out how to specify this in the React code of daml-ui-template.
const defaultCreateParticipantProps: InputDialogProps<CreateParticipant> = {
open: false,
title: "Add Participant",
defaultValue: {participant: "", **participantInfo: null** },
fields: {
participant: {
label: "Participant Party Id",
type: "text",
},
participantInfo: {
label: "Information",
**type: Participant,**
},
},
onClose: async function () {},
};```
I'm getting a compiler error when specifying the default value for the parameters (null), and the "type" cannot be specified as Participant. This is a mandatory field. Can please show me how to specify a default value and type here.
Many thanks!