Loading indicator on a custom action with alpineClickHandler

My action process is ran with alpinejs component rather than a submit action
    public function securityKeyAction(): Action
    {
        $name = \App\Services\TwoFactorService::SECURITY_KEY_METHOD;
        return Action::make("securitykey")
            ->label("Register new key")
            ->icon('heroicon-c-plus-circle')
            ->color('success')
            ->hidden(function () use ($name) {
                return $this->config['methods'][$name]['enabled'] ? false : true;
            })
            ->extraAttributes(['x-data' => 'registerPasskey', 'x-show' => 'browserSupportsWebAuthn()'])
            ->alpineClickHandler('register("' . Str::random(10) . '")');
    }


But I want to display a loading indicator while it goes through the flow, but cant seem to find a way to show the indicator.

The blade is rendering just with
```php
{{$this->securityKeyAction}} rather than blade components for the button etc
Was this page helpful?