Delete repeater items from UI and database at the same time
Inside of the edit action of a relationmanager I have a repeater form. Everything is working correct but now I need to delete the items. From a UX standpoint I dont like it that a user needs to press Save before the item is actually deleted. I have tried some things where the item is deleted from the database but then the UI is not updated.
Then the other option is to use the standard delete but then you need to press save which in my opinion is not needed. Does anybody have a solution where both requirements are met? I have tried this in my code:
Then the other option is to use the standard delete but then you need to press save which in my opinion is not needed. Does anybody have a solution where both requirements are met? I have tried this in my code:
Solution:Jump to solution
this works, deletes the item from the ui and with a custom delete statement
```php
Repeater::make('Attachments')
->relationship('attachments')...
1 Reply
Solution
this works, deletes the item from the ui and with a custom delete statement