If I have an array of objects, when I delete an object from the middle of my array, all objects with index greater than the object deleted are temporarily wrong. This is best explained with an example. Imagine I have an array of the following:
[
{firstName: "james", lastName: "morris", dob: "22.05.1990", hair: "brown"},
{firstName: "john", lastName: "smith", dob: "12.05.1994", hair: "brown"},
{firstName: "janice", lastName: "jackson", dob: "18.06.1975", hair: "brown"},
{firstName: "mary", lastName: "shelly", dob: "01.02.1967", hair: "blonde"}
]
and an associated schema. when I pass this schema and data to JSONForms without an explicit UI schema it renders using the MaterialArrayLayoutRenderer. Now when I delete the index=1, john smith entry through the UI, everything initially appears correct. I now have 3 items in my array, with labels, james, janice, mary. However when I expand the janice array object it displays the data from john smith and when I expand the mary, it displays the data from from janice jackson. However I believe that the underlying data is actually fine, it’s just the display of the internal array objects that hasn’t been updated, my reason for thinking this is that I have a home screen in my app that doesn’t contain the JsonForms component and when I switch to and from my homescreen back to the page where I can see the data, everything appears to be in sync and correct.
Initially, I was using a custom MaterialArrayLayoutRenderer, MaterialArrayLayout and ExpandPanelRenderer when I noticed the issue but have since reverted back to using the OOTB renderers and have noticed the same issue.
Hopefully my above description of the issue i’m seeing is sufficient, if not I can provide screenshots and anything else to help debug.