form.customer.json
{
"key": "profileDetails.address.addressDetails[].country.masterCode",
"ngModelOptions": { "updateOn": "change blur" },
"autopopulateTo": [
"serviceUser.serviceUser.address.addressDetails[0].country.masterCode"
],
"validationMessage": {
"1": "This field is required"
}
}
{
"key": "profileDetails.address.addressDetails[].province.masterCode",
"reload": {
"service": "CustomerProfileProvinceLoader",
"fetchAction": "load",
"updateAction": "updateValues",
"watch": [
"profileDetails.address.addressDetails[arrayIndex].country.masterCode"
]},
"autopopulateTo": [
"serviceUser.serviceUser.address.addressDetails[0].province.masterCode"
],
"ngModelOptions": {
"updateOn": "change blur"
},
"disabled": "!model.profileDetails.address.addressDetails[arrayIndex].country.masterCode",
"validationMessage": {
"1": "This field is required"
}
}
schema.customer.json
"province": {
"type": "object",
"properties": {
"masterCode": {
"title": "Province",
"description": "Select province",
"type": [
"null",
"string"
],
"enum": []
}
},
"required": [
"masterCode"
]
},
"country": {
"type": "object",
"properties": {
"masterCode": {
"title": "Country",
"description": "Select country",
"type": [
"null",
"string"
],
"enum": []
}
},
"required": [
"masterCode"
]
}
Data:
{
"code" : "Country1",
"name" : "Country1",
"default" : "Y",
"provinces" : {
"province" : [
{
"code" : "P1",
"name" : "PROVINCE1",
"cities" : {
"city" : [
{
"code" : "1234",
"name" : "city1",
"default" : "Y"
}
]
}
},
{
"code" : "P2",
"name" : "PROVINCE2",
"cities" : {
"city" : [
{
"code" : "c1",
"name" : "city2"
},
{
"code" : "c2",
"name" : "city3"
}
]
}
}
]
}
}
Here in the above code country field is a dropdown. whenever I change the country field value "RangeError: Maximum call stack size exceeded" is produced. and the province field which should be deselected, is not happening.
Problem is with the data which I load into country field. Because whenever I load the above data(which consists of provinces.province), error was thrown.