“I have FormData
which contains an array of objects. Each time the objectId
changes, a different object is passed into FormData
. However, the newly updated FormData
is not reflected in the form.”
const schema = {
“type”: “object”,
“title”: “Visual Assessment Form”,
“required”: ,
“properties”: {
“visual_header”: {
“type”: “object”,
“title”: “--------VISUAL CENTER--------”,
“properties”: {
“visual_presence”: {
“enum”: [“Yes”, “No”],
“type”: “string”,
“title”: “Can you identify the visual center?”,
“segLabel”: “Visual Center”,
“toolMapping”: “brush”
}
}
},
“condition_header”: {
“type”: “object”,
“title”: “--------CONDITION--------”,
“properties”: {
“condition_IRF”: {
“enum”: [“Yes”, “No”, “Ungradable”],
“type”: “string”,
“title”: “Is IRF present?”,
“segLabel”: “IRF”,
“toolMapping”: “brush”
},
“condition_SRF”: {
“enum”: [“Yes”, “No”, “Ungradable”],
“type”: “string”,
“title”: “Is SRF present?”,
“segLabel”: “SRF”,
“toolMapping”: “brush”
}
}
},
“remarks_header”: {
“type”: “object”,
“title”: “”,
“properties”: {
“remarks”: {
“type”: “string”,
“title”: “Additional Remarks”
}
}
},
“assessability_header”: {
“title”: “”,
“properties”: {
“assessability”: {
“enum”: [“Yes”, “No”],
“type”: “string”,
“title”: “Is the Study Assessable?”
}
}
}
},
“description”: “”
}
const uiSchema = {
“visual_header”: { “visual_presence”: { “ui:widget”: “radio” } },
“condition_header”: {
“condition_IRF”: { “ui:widget”: “radio” },
“condition_SRF”: { “ui:widget”: “radio” }
},
“remarks_header”: { “remarks”: { “ui:widget”: “textarea” } },
“assessability_header”: { “assessability”: { “ui:widget”: “radio” } }
}
const formData= [
{ “visual_header”: { “visual_presence”: “Yes” }, “condition_header”: { “condition_IRF”: null, “condition_SRF”: null }, “remarks_header”: { “remarks”: “ere” }, “assessability_header”: { “assessability”: null }, “SectionNumber”: 0 },
{ “visual_header”: { “visual_presence”: null }, “condition_header”: { “condition_IRF”: null, “condition_SRF”: null }, “remarks_header”: { “remarks”: “NEW DATA” }, “assessability_header”: { “assessability”: null }, “SectionNumber”: 1 },
{ “visual_header”: { “visual_presence”: null }, “condition_header”: { “condition_IRF”: “Yes”, “condition_SRF”: null }, “remarks_header”: { “remarks”: “NEW DATA” }, “assessability_header”: { “assessability”: null }, “SectionNumber”: 3 },
]
const CurrentFormData = Formdata[objectId] // objectId is keep changing based on request
I would greatly appreciate it if someone could take a look and provide any insights or suggestions to resolve this issue. If you need any more details or code snippets to understand the problem better, please let me know!