Thijmen
Thijmen
FFilament
Created by Thijmen on 9/20/2024 in #❓┊help
Timeout on specific computer
I have a simple table with 270k records that is working fine for all users. I have a second table with 5k of those 270k records but almost no users can see this page. They all get a timeout and in Sentry i also see the 30 seconds timeout exceeded. If i sign in with their user accounts on my own computer it is working fine. Any reason why this page with table couldnt load on this specific computers?
17 replies
FFilament
Created by Thijmen on 6/5/2024 in #❓┊help
Weeknumbers in datepicker
Is there a way to add weeknumbers to the datepicker field?
10 replies
FFilament
Created by Thijmen on 2/7/2024 in #❓┊help
Page without tenancy prefix
What is the best way to add a filament page without the tenancy prefix? With a resource you have the option to use $isScopedToTenant = false; But this isnt possible with a page.
9 replies
FFilament
Created by Thijmen on 2/7/2024 in #❓┊help
Modal Icon aligning
No description
19 replies
FFilament
Created by Thijmen on 2/2/2024 in #❓┊help
dashboard filtersForm() not showing up
My dashboard extends Filament\Pages\Dashboard, on that dashboard page i have the Filament\Pages\Dashboard\Concerns\HasFiltersForm. I added the filtersForm() like this:
public function filtersForm(Form $form): Form
{
return $form
->schema([
Section::make([
DatePicker::make('from')
->label('From')
->default(Carbon::now()->subMonth()),
DatePicker::make('to')
->label('To')
->default(Carbon::now()),
]),
]);
}
public function filtersForm(Form $form): Form
{
return $form
->schema([
Section::make([
DatePicker::make('from')
->label('From')
->default(Carbon::now()->subMonth()),
DatePicker::make('to')
->label('To')
->default(Carbon::now()),
]),
]);
}
Still i don't see any form at the dashboard page.
19 replies
FFilament
Created by Thijmen on 1/23/2024 in #❓┊help
Global widget filter is null
I have followed the docs to create a global widget filter. My dashboard page has:
use HasFiltersAction;
protected function getHeaderActions(): array
{
return [
FilterAction::make()
->form([
DatePicker::make('startDate')
->label('Startdatum')
->default(now()->startOfYear()),
DatePicker::make('endDate')
->label('Einddatum')
->default(now()->endOfYear()),
])
];
}
protected function getHeaderActions(): array
{
return [
FilterAction::make()
->form([
DatePicker::make('startDate')
->label('Startdatum')
->default(now()->startOfYear()),
DatePicker::make('endDate')
->label('Einddatum')
->default(now()->endOfYear()),
])
];
}
On my widget class i dd() the filters like this: dd($this->filters); But it keeps saying null. If i apply the filters in the slideover it still says null/
3 replies
FFilament
Created by Thijmen on 1/22/2024 in #❓┊help
TableWidget modal not opening
I have a tablewidget with the following code:
TextColumn::make('contents')
->label('Inhoud')
->icon('heroicon-s-cube')
->action(Action::make('contents')
->action(fn (Colli $record) => $record->advance())
->modalContent(fn (Colli $record): View => view('filament.fields.shipment-table-contents', ['record' => $record]))
)
->limit(50),
TextColumn::make('contents')
->label('Inhoud')
->icon('heroicon-s-cube')
->action(Action::make('contents')
->action(fn (Colli $record) => $record->advance())
->modalContent(fn (Colli $record): View => view('filament.fields.shipment-table-contents', ['record' => $record]))
)
->limit(50),
According to the following docs that should be good: https://filamentphp.com/docs/3.x/actions/modals#custom-modal-content. Only problem now is that no modal opens.
39 replies
FFilament
Created by Thijmen on 1/19/2024 in #❓┊help
Table Widget hidden() not working
I have a Table Widget on a view page. On a TextColumn i have the following code:
->icon(fn ($record) => json_decode($record->details)->ConsumerDetails->DeliveryMethod === 'AFH' ? 'heroicon-s-building-storefront' : 'heroicon-s-truck')
->icon(fn ($record) => json_decode($record->details)->ConsumerDetails->DeliveryMethod === 'AFH' ? 'heroicon-s-building-storefront' : 'heroicon-s-truck')
->hidden(fn ($record) => json_decode($record->details)->ConsumerDetails->DeliveryMethod === 'AFH')
->hidden(fn ($record) => json_decode($record->details)->ConsumerDetails->DeliveryMethod === 'AFH')
For some reason the ->icon() is working fine and for ->hidden() i get the error: Attempt to read property "details" on null
4 replies
FFilament
Created by Thijmen on 1/17/2024 in #❓┊help
unsavedChangeAlerts
What triggers the unsavedChangeAlerts? I have a resource that gives this alert without me changing anything. What would be the best way to figure out wat can trigger this?
6 replies
FFilament
Created by Thijmen on 1/12/2024 in #❓┊help
Enter key with suffixAction
I used keybindings to bind the keys to my suffixAction. This works ones. After the first time you can't use the enter key anymore. Is there a way to fix this or 'reset' the form in some kind of way?
4 replies
FFilament
Created by Thijmen on 1/11/2024 in #❓┊help
Form not doing anything
I created a Filament page with a form on it. The form is rendering but all of the other functions are not working. When i try ->afterStateUpdated() on the fields nothing happens. Probably i must have forgotten something but i can't find it. This is the page: https://gist.github.com/ThijmenKort/9f8eafb7a5253b09b71da7e45e9ebbf1
11 replies
FFilament
Created by Thijmen on 1/3/2024 in #❓┊help
Pass table collection to other blade
Is there a way to get the query or collection from the table and pass this on to a blade? I have a action on the list page that needs this query/collection.
48 replies
FFilament
Created by Thijmen on 12/11/2023 in #❓┊help
Custom Operator in Query Builder
I have this code:
Constraint::make('min_max')
->label('Min-Max')
->icon('heroicon-o-adjustments-horizontal')
->operators([
Operator::make('min_max')
->label(fn (bool $isInverse): string => $isInverse ? 'Onder minimum' : 'Tussen minimum en maximum')
->summary(fn (bool $isInverse): string => $isInverse ? 'Onder minimum' : 'Tussen minimum en maximum')
->baseQuery(fn (\Illuminate\Database\Query\Builder $query, bool $isInverse) => $query->where('stock', fn (\Illuminate\Database\Query\Builder $query) => $query->whereKey(auth()->user()),)),
])
Constraint::make('min_max')
->label('Min-Max')
->icon('heroicon-o-adjustments-horizontal')
->operators([
Operator::make('min_max')
->label(fn (bool $isInverse): string => $isInverse ? 'Onder minimum' : 'Tussen minimum en maximum')
->summary(fn (bool $isInverse): string => $isInverse ? 'Onder minimum' : 'Tussen minimum en maximum')
->baseQuery(fn (\Illuminate\Database\Query\Builder $query, bool $isInverse) => $query->where('stock', fn (\Illuminate\Database\Query\Builder $query) => $query->whereKey(auth()->user()),)),
])
And i get this error from it. Argument #1 ($query) must be of type Illuminate\Database\Query\Builder, Illuminate\Database\Eloquent\Builder given Did I do something wrong here? I followed the docs so not sure.
10 replies
FFilament
Created by Thijmen on 12/9/2023 in #❓┊help
Prefetching hover SPA mode
Does Filament use prefetching on hover in SPA mode? Or is there a option to configure it?
17 replies
FFilament
Created by Thijmen on 11/14/2023 in #❓┊help
TableWidget
No description
2 replies
FFilament
Created by Thijmen on 11/11/2023 in #❓┊help
Lazy loading global search
Is there a way to disable the lazy loading of the global search?
17 replies
FFilament
Created by Thijmen on 11/9/2023 in #❓┊help
Search in hidden column
Is there a way to make a variable searchable but not visible in the table?
3 replies
FFilament
Created by Thijmen on 10/18/2023 in #❓┊help
Custom colors with TextColumn badges
Is there a way to get custom colors as badge?
3 replies
FFilament
Created by Thijmen on 10/17/2023 in #❓┊help
Action in Form
I've copied this code from the docs but am getting a error. I've tried to switch action classes but that doesnt solve it https://filamentphp.com/docs/3.x/forms/actions#defining-a-form-component-action
\Filament\Forms\Components\Actions\Action::make('resetStars')
->icon('heroicon-m-x-mark')
->color('danger')
->requiresConfirmation()
->action(function () {

}),
\Filament\Forms\Components\Actions\Action::make('resetStars')
->icon('heroicon-m-x-mark')
->color('danger')
->requiresConfirmation()
->action(function () {

}),
Error:
Filament\Forms\ComponentContainer::Filament\Forms\Concerns\{closure}(): Argument #1 ($component) must be of type Filament\Forms\Components\Component, Filament\Forms\Components\Actions\Action given
Filament\Forms\ComponentContainer::Filament\Forms\Concerns\{closure}(): Argument #1 ($component) must be of type Filament\Forms\Components\Component, Filament\Forms\Components\Actions\Action given
6 replies
FFilament
Created by Thijmen on 10/12/2023 in #❓┊help
Filament on different domains
Is multi panel on different domains only possible on subdomains? Or is there a way to get it to work on different domains?
34 replies