How do you add processing spinner to wizard button?
As an example, in a wizard the next button has a processing spinner but the submit does not, how do I add it to the submit?
20 Replies
It has one by default. Why are you overriding the view instead of modifying the existing submit action
Iirc you should be able to
Something along those lines.
I'm doing what is in the documentation: https://filamentphp.com/docs/3.x/forms/layout/wizard#rendering-a-submit-button-on-the-last-step
Ah, ok. I would still expect it to have the spinner by default since the filament button view is tied to wire:loading.
I would expect it to, put it does not. When I view the code of the next button you can see the loader code. The submit button does not have it. This is the case for any <x-filament::button> on a custom page
This is also the case when creating action in a resource {{ $this->downloadResultAction }}
Hmm, could be a bug, but looking at the button code it should be working unless there is an explicit alpineClickHandler assign on the action.
Loading indicator is true by default. So as long as the action has a wire:click it should work.
Maybe the livewire return is coming back quick enough to prevent it from showing but the dom diff is taking longer than expected. Hard to say.
In the wizard case it is copy paste from the documentation. The code is not there for the loader in the view.
Solution
Maybe adding this
wire:target="your_submit_method"
to the buttonThat added the svg code but is not firing it. In the next button I can see it firing in the code regardless of the time it takes. My submit method is create(). Do I need to scope it to the resource? Or call it a different way?
Sorry to reply to you
Could you share the whole code?
Down on line 233 is the button
Trying with just the name of the method. So ‘create’ instead of ‘create()’
Yes! That is working for the wizard.
Is it the same question?
https://github.com/filamentphp/filament/discussions/13262#discussioncomment-9779259
GitHub
How do you add processing spinner to wizard button? · filamentphp f...
Package Form builder Package Version v3.2 How can we help you? In a custom page. As an example, in a wizard the next button has a processing spinner but the submit does not, how do I add it to the ...
Yes
Answered 😅
Team work. 💪
Makes the dream work
Is there anyway I can add a loader to Action Buttons? Like in this case:
This is a link
I understand. The action buttons that are actions have the loader. Thanks so much for all your help