Bulk Actions and Error Handling -- What are our options? #1035
-
Hi there, I have made a bulk action. Naturally, an action has a chance to encounter an error in the backend. However, I notice throwing an exception has no effect at all on the table or view. Secondly, I could not find anything in the documentation about this. Preferably I would be able to put a single error message rendering at the top of the table, a dismissible alert. But the Custom View can only be appended at the bottom from what I can see, and although there might be a solution involving Just wondering, is Custom View the only option here in terms of error handling? Basically populate some Another option I am thinking of is maybe flashing a session message about it and rendering it completely outside of the livewire table entirely. Just hoping to hear some other ideas or point me in the right direction if anyone has any advice, thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
You can add a view to any of the following configurable areas. before-toolbar is likely to be your friend here!
There's a map of where they relate to at the bottom of this page: https://rappasoft.com/docs/laravel-livewire-tables/v2/datatable/configurable-areas |
Beta Was this translation helpful? Give feedback.
-
I made this PR and tested it and am using it now in my project. |
Beta Was this translation helpful? Give feedback.
-
So often the way! I've got a couple of other bits that I'll be doing PRs for, so I'll add a link into the documentation to/from the customView and Configurable Areas. I imagine a before-table would come above the section, whereas before toolbar comes after the sorting/filter pils, but before the toolbar itself. I think Anthony will be more likely to accept a PR for that than for your current PR, as another customView will probably add to the confusion! |
Beta Was this translation helpful? Give feedback.
You can add a view to any of the following configurable areas. before-toolbar is likely to be your friend here!
There's a map of where they relate to at the bottom of this page:
https://rappasoft.com/docs/laravel-livewire-tables/v2/datatable/configurable-areas