emil
emil
FFilament
Created by emil on 1/9/2025 in #❓┊help
HeaderActions stops working with HasTable
class MyPage extends Page implements HasInfolists, HasForms, HasTable
{
use InteractsWithInfolists;
use InteractsWithForms;
use InteractsWithTable;

protected function getHeaderActions(): array
{
return [
\Filament\Actions\Action::make('test')
->slideOver(),
];
}
}
class MyPage extends Page implements HasInfolists, HasForms, HasTable
{
use InteractsWithInfolists;
use InteractsWithForms;
use InteractsWithTable;

protected function getHeaderActions(): array
{
return [
\Filament\Actions\Action::make('test')
->slideOver(),
];
}
}
The Table contract/trait causes the headerAction not to open a slideover. No console errors. Regular x-filament-panels::page. Any ideas, anyone?
16 replies
FFilament
Created by emil on 12/11/2024 in #❓┊help
InteractsWithRecord + Clusters = Not possible?
Using custom Filament page (\Filament\Pages) Page is within a Cluster. What I want to achieve: Having user/{tenant}/cluster/{model}/page work - working with a specific record in a custom Page, where the Page is inside a Cluster. On the Cluster class, I define slug:
protected static ?string $slug = 'cluster';
protected static ?string $slug = 'cluster';
On the Page class, I define this:
use InteractsWithRecord;
public Service $service;

public static function getRoutePath(): string
{
return '{service}/page';
}
public function mount(Service $service): void
{
$this->service = $service;
}
use InteractsWithRecord;
public Service $service;

public static function getRoutePath(): string
{
return '{service}/page';
}
public function mount(Service $service): void
{
$this->service = $service;
}
php artisan route:list declares this:
GET|HEAD user/{tenant}/cluster/{service}/page
GET|HEAD user/{tenant}/cluster/{service}/page
View looks like this
<x-filament-panels::page>
{{ $this->form }}
</x-filament-panels::page>
<x-filament-panels::page>
{{ $this->form }}
</x-filament-panels::page>
I get the error:
Missing required parameter for [Route: filament.user.cluster.pages.{service}.page] [URI: user/{tenant}/cluster/{service}/page] [Missing parameter: service].
Missing required parameter for [Route: filament.user.cluster.pages.{service}.page] [URI: user/{tenant}/cluster/{service}/page] [Missing parameter: service].
If I set getSubNavigation to return an empty array (the breadcrumbs), I get the page to render. What am I missing - feels like I'm over-complicating this?
13 replies
FFilament
Created by emil on 11/20/2024 in #❓┊help
Injecting $record and using ->when
$record becomes an instance of TextColumn instead of Model when using the ->when condition. Is this expected behaviour? TextColumn::make('state') ->when(fn($record) => dd($record))
17 replies
FFilament
Created by emil on 10/18/2024 in #❓┊help
Table Split seems broken?
No description
3 replies
FFilament
Created by emil on 5/19/2024 in #❓┊help
Soft-deleted relations
Found other posts before but no answers. Works when campaign is soft-deleted: TextColumn::make('campaign.user.name') However, this doesn't work: ->url(fn ($record) => UserResource::getUrl('edit', [$record->campaign->user])) modifyQueryUsing is eager loading it - however that doesn't seem to affect $record. Query being run: select * from campaigns where campaigns.id in (5) and campaigns.deleted_at is null Modify query on the table: ->modifyQueryUsing(function ($query) { return $query->with(['campaign' => function ($query) { $query->withTrashed()->with(['user']); }]); })
7 replies
FFilament
Created by emil on 5/19/2024 in #❓┊help
Soft-deleted relations
Found other posts before but no answers. TextColumn::make('campaign.user.name') What is the campaign is soft deleted? modifyQueryUsing doesn't seem to do anything (checked with query debugger) ->modifyQueryUsing(function ($query) { return $query->with(['campaign' => fn($query) => $query->withTrashed()]); })
4 replies
FFilament
Created by emil on 4/14/2024 in #❓┊help
ImportAction sample data broken in latest release?
No description
2 replies
FFilament
Created by emil on 4/3/2024 in #❓┊help
Listener on *resource* (not page)
I know listeners on Pages are easy enough - but I can't get them to work on a resource. Essentially having JS (custom view) trigger something in the parent Resource that it is called from.
5 replies
FFilament
Created by emil on 3/30/2024 in #❓┊help
formEvents gone in 3.0?
Did formevents disappear with Filament 3.0? The ability from pure JS send events to Filament component.
7 replies
FFilament
Created by emil on 3/25/2024 in #❓┊help
Register Page in navigation
I feel utterly stupid.. I have a page (EditRecord) in my resource, and want this page to be displayed in the main navigation. Whatever I try - all from registering it as a Page in the provider, to sub navigation in the resource, it won't appear in the sidebar. What part of the docs am I missing?
2 replies
FFilament
Created by emil on 3/20/2024 in #❓┊help
Just bought Filament's Minimal Theme - with the hopes it would be "stable" for current Filament.
Followed the install instructions, cleared cache, rebuilt npm etc. Part of the app looks like the new theme, whereas other parts such as wizards appear broken. https://share.cleanshot.com/nQVV3zmd
7 replies
FFilament
Created by emil on 3/15/2024 in #❓┊help
Images of components
Is there any collection of images of Filament elements? The docs are great, but doesn't show how the elements appears visually, which would be great to be able to plan the page without having to test each element one by one.
5 replies