primary-violetP
Refine2y ago
5 replies
primary-violet

Displaying data with a mix of Form and EditableaTable

Hello everyone !
I've been using Refine since a couple of weeks and it has been a really amazing discovery!
The documentation is great but I can't find a way to include both an EditeableTable and a Form within the same component (which is plugged to a Strapi datasource).
I have an object that includes a few classic attributes and a repeatable component (which is an Array of objects).

I'm able to display all the first level attributes in my page within the form and also to display all the objects of the array in the EditeableTable, but I can't manage to edit or add lines to the Table.
I see that the GET/PUT requests are made against my Table line IDs instead of my main object ID.
What am I missing in order to pass the right ID to the the EditableTable and ensure that even when editing one line of the Table I update the whole object ?

Here's my object structure

interface LeasingScale { id: number; wp_id: number; name: string; createdAt: string; updatedAt: string; publishedAt: string; rates: Rate[]; } interface Rate { id: number; lenght: number; }
Was this page helpful?