I feel like this is a really simple fix, however I can't get this working. I want to define a radiogroup as well as it's default value. I have followed the example here:
https://www.bryntum.com/products/scheduler/docs/api/Core/widget/RadioGroup
Which is :
{
type : 'radiogroup',
title : 'Resolve Conflict',
name : 'resolution',
value : 'A', // the default choice
options : {
A : 'Keep the original version',
B : 'Use the new version',
C : 'Reconcile individual conflicts'
}
}
Here is a snippet from my schedulerConfig I'm passing into the Scheduler component:
eventEdit: {
items: {
eventTypeField: {
type: 'radiogroup',
name: 'eventType',
label: 'Event Type',
flex: '1 1 auto',
weight: 100,
value: "appointment",
options: {
appointment: 'Appointment',
meeting: 'Meeting',
timeOff: 'Time Off',
},
listeners: {
change: onEventTypeChangeHideOrShowFields
}
},
...
}
}
However, it does not work. In my IDE, it gives me the following error on the "value" parameter:
TS2322: Type '{ type: "radiogroup"; name: string; label: string; flex: string; weight: number; value: string; options: { appointment: string; meeting: string; timeOff: string; }; listeners: { change: ({ source, value }: { source: any; value: any; }) => void; }; }' is not assignable to type 'boolean | Partial<ContainerItemConfig> | null'. Object literal may only specify known properties, and 'value' does not exist in type 'Partial<RadioGroupConfig>'.