Hi everyone,
I am currently facing an issue in Alpha Studio related to rendering table type data inside a loop.
Description:
When iterating through a JSON structure to render fields dynamically, everything works fine for most field types like "input" and "date". Even for "table" types, the table UI renders properly, but the data inside the table is not being displayed but i had mapped correctly.
It seems that when the component hits a type: "table" inside the loop, it recognizes it correctly and displays the table layout โ but it doesnโt render the rows from the value array.
Example JSON Snippet:
{
"key": "diagnosis",
"value": [
{
"primary": false,
"diagnosis": "Ischialgia",
"icd_code": ["M54.3"],
"description": "Pain radiating along the sciatic nerve..."
},
{
"primary": true,
"diagnosis": "Vertigo",
"icd_code": ["R42"],
"description": "A sensation of spinning dizziness..."
}
],
"type": "table",
"error": ""
}
Whatโs working:
- Table type is detected correctly .
- The table component appears.
Whatโs not working:
- The data rows inside the
valuearray are not rendering. - No error shown; it just silently fails to display the content.
Suspected Cause:
It might be a rendering issue where the loop isnโt correctly accessing or mapping over the nested value array when type is "table".
Request:
Has anyone faced this before or found a fix or workaround? Any insight into how the table rows can be correctly rendered inside a loop would be appreciated.
Thanks!