Relationship repeater fields are reset when clicking save button, but saves actually.
When I update form fields (including repeater part) and submit, repeater fields returns to old values. But data is updated in database.
When I refresh page repeater fields are filled with fresh records.
I found out that when save button is clicked firstly form data is saved after that relationship data is saved
But when form is saved all fields are refreshed including repeater values, but at this time relationship is not updated yet and its field are filled with old values.
So, how can I make repeater fields not to return to old values when save button is clicked?
7 Replies
Up pls
Can you share a video of the issue and your code?
This is the part of Filament resource, representing the repeater. Actually it is table repeater plugin, but I am getting the same issue when using built in repeater
Same for relation manager. When you have relation manager under the from and update records within the form that are also displayed in relation manager table, relation manager table is not updated after save, until reload page manually
Makes sense for the relation manager that you have to reload it for the new results. But it’s weird on the repeater because you already modified the data 🤔
Same problem here. Version 3.2.70
Seems to be bug?
Docs say that, when we use repeater with relationship, we have to have relationship columns nullable, because first of all only form data is saved and after thet relationship data.
I think, when we click submit button form data is saved and form (including repeater) is re-rendered, at this stage only form data is saved and that's why repeater values return to old data.