Description:
When adding the following Html2MediaAction to the actions of a resource:
Html2MediaAction::make('facture')
->icon('heroicon-o-document-arrow-down')
->label("Facture")
->margin([25, 15, 25, 15]) // Set custom margins
->content(fn($record) => view('facture', ['facture' => $record]))
->filename('facture.pdf')
I encounter the following error in the Filament panel:
Unable to call component method. Public method [toJSON] not found on component
This error breaks the panel design, but the button generates the PDF as expected.
Steps to Reproduce:
1- Install torgodly/html2media.
2- Add the Html2MediaAction to a Filament resource's actions list.
3- Open the resource page in the Filament admin panel.
4- Observe the error in the browser console or logs.
Environment:
Laravel Version: 11.40.0
Livewire Version: v3.5.12
Filament Version: v3.2.135
Plugin Version: 1.1.3
PHP Version: 8.4.2
Description:
When adding the following Html2MediaAction to the actions of a resource:
I encounter the following error in the Filament panel:
This error breaks the panel design, but the button generates the PDF as expected.
Steps to Reproduce:
1- Install torgodly/html2media.
2- Add the Html2MediaAction to a Filament resource's actions list.
3- Open the resource page in the Filament admin panel.
4- Observe the error in the browser console or logs.
Environment:
Laravel Version: 11.40.0
Livewire Version: v3.5.12
Filament Version: v3.2.135
Plugin Version: 1.1.3
PHP Version: 8.4.2