Including a Livewire component inside an Infolist

Hi,
I try to render a small Livewire component inside an Infolist modal.

It renders when using ViewEntry component, but when I call a method from the Livewire component, it fails with the error

Unable to call component method. Public method [confirmLoginLink] not found on component

The component is supposed to start some background stuff and then update when a model instance is changed.

ViewEntry
Infolists\Components\ViewEntry::make('get_login_link')
  ->view('livewire.get-login-link', ['site' => $infolist->record->site]),


Livewire template
<button type="submit" wire:click="confirmLoginLink({{ $site->id }})">
    Click me
</button>


I suspect that I'm using the wrong approach here, and would appreciate if someone could point me in the right direction.
Was this page helpful?