3 ms·
Hi! Thanks for parsing it. How could I implement an error flash message in case the delete fails in this case?
by hu3 3y ago
Hi! Thanks for parsing it.
How could I implement an error flash message in case the delete fails in this case?
- wild_egg 3y agoI've found the simplest option is to have the server respond with the markup for the flash message. The server can include a couple response headers to override the placement of the message to not affect the existing page state https://htmx.org/docs/#response-headers https://htmx.org/docs/#response-headers This allows the error to either be added inline in the UI somewhere or (my preference) displayed as a toast by appending to the end of the <body>
- hu3 3y agoPerfect thanks!