Open p4rad0xus opened 1 year ago
If I just use the x-splade-form
component in the Blade file, the rehydration works as expected.
<x-splade-form action="{{ route('table_entry.store') }}"
@success="$splade.emit('entry-added')"
class="flex flex-row items-end space-x-4"
stay>
</x-splade-form>
Is it in this solution possible to reset the formula if the submit was a success?
Do anyone know a solution for the rehydration by using the SpladeForm
?
Description:
On a Blade page I use a table and a form. To create the table I use SpladeForm in the controller.
When the form is sent, the contents of the table should be reloaded using x-splade-rehydrate. Instead the page is reloaded and the new entry is displayed. If I remove the
stay
attribute on the x-splade-form tag and add->stay()
to the SpladeForm instead, you stay on the page but the table is not reloaded.I have the same behavior when I use the SpladeForm class.
Steps To Reproduce Issue:
In the frontend my site looks like this:
My index function in the controller:
TableEntrys is a SpladeTable.
My store function in the controller: