I tried out a new version of Hubleto and wanted to use some of it's forms. But I later found out the data in tables inside forms is not saving.
I decided to dig around and found out the relation data (an array of objects) in the Form.tsx in the saveRecord()
method is deleting itself when it's being transferred into the record
variable.
The data looks similar to this:
{
id: 1,
PRODUCTS: [
{id: 1},
{id: 2}
]
}
It happens at this line specifically:
let record = { ...this.state.record, id: this.state.id };
Any idea of why it's happening?
Most probably your form description did not contain includeRelations
property. Check the Description API: https://developer.hubleto.com/advanced-development/description-api/form