I have an editable table and want to save the changes to the backend of my application. To do so, I use three elements:
The table's changesetArray
An OpenAPI resource (with a POST endpoint that takes an array of changes as a request body)
A transformer that maps the rows from the changeset to the format the API call needs.
The problem?
When I hardcode the transformer's value in the request body, it works. When I use the transformer's value as a variable in the request body, it fails with this error message:
As you can see here, I'm passing an array, and it works. And it's literally the same output that the transformer produces.
As an extra hint, I took a look at the network tab on my browser, and copied the body of the requests (hardcoded and variable reference) and I see that it's different:
Yes, this must be frustrating if your transformer produces the same exact result as the hardcoded data. Can you try it with a regular javascript query instead of a transformer?
Also, would you mind exporting your json to me so I can take a look at your data? Please also provide the api resource. Thanks!