Form is not updated after saveRelationshipsUsingCallback
I am creating a new form field, which is based on a relationship.
In the
saveRelationshipsUsing
, I am setting the new values with the ->state()
method. I tested it one line later with dd
and I can see the correct values. The problem is, that the form field doesn't get the new values. It keeps the old ones. After a page refresh I can see the new ones (so the save process is working).
I tried to debug it, by adding a dd
into the afterStateHydrated
callback (not on page load, just before I click on save). There I still have the old values as well.3 Replies
send the code
I solved it in the meantime by reloading the relationship
ok, but we cant help unless we see the code