Señor Nikola
Señor Nikola
FFilament
Created by Señor Nikola on 2/21/2025 in #❓┊help
Custom Action within TablesRenderHook::TOOLBAR_SEARCH_BEFORE
Yeah, that worked! Thanks
7 replies
FFilament
Created by Señor Nikola on 2/21/2025 in #❓┊help
Custom Action within TablesRenderHook::TOOLBAR_SEARCH_BEFORE
public function generatePdfAction (): Action
{
return Action::make('generatePdfAction')
->label('Export to PDF')
->extraAttributes(['data-generate-pdf' => true])
.....
public function generatePdfAction (): Action
{
return Action::make('generatePdfAction')
->label('Export to PDF')
->extraAttributes(['data-generate-pdf' => true])
.....
Action is working now naming issue as you said, but when i try to access via JS that data-generate-pdf via click listner it does not have any effect...
document.addEventListener('livewire:init', function () {
document.querySelector('[data-generate-pdf]').addEventListener('click', function (e) {
document.addEventListener('livewire:init', function () {
document.querySelector('[data-generate-pdf]').addEventListener('click', function (e) {
7 replies
FFilament
Created by Señor Nikola on 2/20/2025 in #❓┊help
Generating Current View for PDF
No description
5 replies
FFilament
Created by Señor Nikola on 2/20/2025 in #❓┊help
Generating Current View for PDF
These are my dimensions that i have set up via browsershot if we meant on same thing
#[On('generate-pdf')]
public function generatePdfFromHtml($html)
{
$filePath = storage_path('app/pdfs/current-page.pdf');

Pdf::html($modifiedHtml)
->withBrowsershot(function ($browsershot) {
$browsershot
->setOption('viewport.width', 1920)
->setOption('viewport.height', 1080)
->windowSize(1920, 1080)
->deviceScaleFactor(1)
->setOption('args', ['--no-sandbox', '--disable-web-security'])
->waitUntilNetworkIdle();
})
->save($filePath);

Notification::make()
->title('PDF Saved')
->body('The PDF has been saved to ' . $filePath)
->success()
->send();
}
#[On('generate-pdf')]
public function generatePdfFromHtml($html)
{
$filePath = storage_path('app/pdfs/current-page.pdf');

Pdf::html($modifiedHtml)
->withBrowsershot(function ($browsershot) {
$browsershot
->setOption('viewport.width', 1920)
->setOption('viewport.height', 1080)
->windowSize(1920, 1080)
->deviceScaleFactor(1)
->setOption('args', ['--no-sandbox', '--disable-web-security'])
->waitUntilNetworkIdle();
})
->save($filePath);

Notification::make()
->title('PDF Saved')
->body('The PDF has been saved to ' . $filePath)
->success()
->send();
}
5 replies
FFilament
Created by Tio Átila on 1/30/2025 in #❓┊help
Loding Table
You can use ->deferLoading() in you config for tables or just that one table, it will have loading indicator (like skeleton). But page will be instantly opened
26 replies
FFilament
Created by ollieread on 1/30/2025 in #❓┊help
The user menu in the top right breaks on one page
Are you using spa()? I my case each time i had filament throw errors in console - spa() was main reason for it. As soon as i turned it off all errors were gone. (Point to note everything was working even with all errors)
10 replies
FFilament
Created by Señor Nikola on 1/29/2025 in #❓┊help
Dispatch Event on AfterStateUpdated()
Tried with $livewire->dispatch('update-counter') but it looks for dispatch() functon on List class hence why i did that extra code 🙂
10 replies
FFilament
Created by Señor Nikola on 1/29/2025 in #❓┊help
Dispatch Event on AfterStateUpdated()
Thanks mate alot! You gave me perfect direction, i passed livewire insatnce as paramter and than i created pub function in List resource whic has access to $this->dispatch() that did the trick ContactFormResource
->afterStateUpdated(function($livewire) {
Notification::make()
->title(__('notifications.status_updated'))
->success()
->send();
$livewire->updateCounter();
})
->afterStateUpdated(function($livewire) {
Notification::make()
->title(__('notifications.status_updated'))
->success()
->send();
$livewire->updateCounter();
})
in ListContactForm
public function updateCounter (): void
{
$this->dispatch('update-counter');
}
public function updateCounter (): void
{
$this->dispatch('update-counter');
}
10 replies
FFilament
Created by Señor Nikola on 1/29/2025 in #❓┊help
Dispatch Event on AfterStateUpdated()
Just wondered if anyone had an solution?
10 replies
FFilament
Created by Señor Nikola on 1/29/2025 in #❓┊help
Dispatch Event on AfterStateUpdated()
Sadly no, it is within static method so $this-> wont work
10 replies
FFilament
Created by sohail on 1/9/2025 in #❓┊help
database notifications conditionally hide mark as unread/read button
Nah tried it first thing 🙂 I get {"error":"An attempt was made to evaluate a closure for [Filament\Notifications\Actions\Action], but [$record] was unresolvable."}
7 replies
FFilament
Created by sohail on 1/9/2025 in #❓┊help
database notifications conditionally hide mark as unread/read button
Bump up 🙂
7 replies
FFilament
Created by Señor Nikola on 1/10/2025 in #❓┊help
Page Action Modal Issue
Yep, thanks!
6 replies
FFilament
Created by Señor Nikola on 1/10/2025 in #❓┊help
Page Action Modal Issue
Thanks @awcodes, was killing myself 🫠
6 replies
FFilament
Created by sohail on 1/9/2025 in #❓┊help
database notifications conditionally hide mark as unread/read button
I had similar issue when tried to hide markAsRead, have not found solution yet..
7 replies
FFilament
Created by Señor Nikola on 12/25/2024 in #❓┊help
Extra Table Classes
No description
4 replies
FFilament
Created by Señor Nikola on 12/16/2024 in #❓┊help
TipTap Disable Certain Headings
Thanks!
5 replies
FFilament
Created by Señor Nikola on 12/12/2024 in #❓┊help
Revealable Password Via Password Component
Thanks good to know! But i decided to use filaments $form within Livewire component instead. 🙂
8 replies
FFilament
Created by Señor Nikola on 12/10/2024 in #❓┊help
TextColumn Setting Properties on AfterStateUpdated()
It is classic filament resource, it is not separate page..
5 replies
FFilament
Created by Señor Nikola on 11/26/2024 in #❓┊help
Filament TipTap Editor - YouTube Extension
Thanks
4 replies