I have a data model that looks like this:
class MyModel extends EventModel {
static get fields() {
return [{
name: 'ids',
convert: (value: (string | number)[]) => (value ?
new Set(value.map((x) => x.toString())) :
undefined),
}, ];
}
This works fine for the initial bryntum page load, but if I try to edit the event, it then tries to execute convert on the already converted value instead of the raw value. This then causes an error e.g. TypeError: value.map is not a function