When a Serializer property defines choices via the choicesCallback function (used to fetch choices asynchronously, e.g., from a server for Creator property grid), JSON validation that checks property values throws a JavaScript error.
Add a property with a choices callback, for example:
Serializer.addProperty("question", { name: "prop1", choices: (obj: Base, choicesCallback: (choices: any) => void) => {
if (obj.getType() === "text") {
choicesCallback([1, 2, 3]);
} else {
choicesCallback([4, 5, 6]);
}
} });