Attach Action is not updating the UI
Inside a ViewPage I have a custom Infolist to display data of the model. Also, I created a few custom Actions to create/edit/update data from the record or related records. But, the problem that I'm having is that inside the infolist I have a Tab for products and another for tasks, with a repeater to show the related record. The products is a BelongsToMany relationship and Tasks is a morphMany. Currently I have an action to create a Task and one to attach a Product, but whenever I attach a new products the infolist UI doesnt update (the new attached product is not shown in the repeater), i have to reload the page manually. Can anyone help me solve it, or understand why its happening?
The code is a too extensive, that's why i cant send the full attach action, but it was built as guided by the documentation: https://filamentphp.com/docs/3.x/infolists/actions#adding-anonymous-actions-to-an-infolist-without-attaching-them-to-a-component. I've tried to load the relationship again, but the only thing I found that works is to refresh the page, but its no good to the user.
0 Replies