Filament

F

Filament

A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire

Join

Relation manager, CreateAction modal: Livewire Exception

Laravel: 12.34.0 Filament: 4.1.8 I have CreateAction of relation manager that works on modal. ...

Detect current mode (dark/light) in custom page

As the title says, what's the best way to detect the current active mode (dark/light) in a custom Filament page? I have something like this ```html...
Solution:
Yeah, what I'm going for right now is transform the existing classes. So from this (example code) ```css /* light.css */ .foobar { border: 1px solid red;...

Modal footer buttons are flickering

Hey everyone, I got a strange issue. The modal footer actions are flickering when i use createOptionForm on a select in the table repeater. Is this a bug in filament?...

Boolean form field that saves as 'visible' or 'hidden' in the database

I have a database column which has the value 'visible' or 'hidden'. I want to display this as a checkbox which when ticked, saves as 'visible' and when unticked saves as 'hidden'. I have the following code:...
Solution:
I guess the easiest way is a Radio field. If you want the checkbox, you need to change the state via the mutation callbacks (like mutateFormDataBefore). You could also try something with ->state() and ->afterStateUpdated() diretly on the Checkbox....

Just asking, anyone faced weird issue on Media Library Plugin (v3)?

The issue I'm facing right now on Media Library Plugin (v3) doesn't saves image on create page but it works on edit page. Thanks forward.

Notification CSS isn't loading for Filament 4 on my Laravel 12?

What I am trying to do: I'm trying to get the Filament 4 Notifications working in my standalone Laravel 12 app, the notifications work, however they have no CSS and wreck the layout. This worked fine when it was Laravel 11 and Filament 3, so I'm really confused....
Solution:
You also need @import '../../vendor/filament/support/resources/css/index.css'; before the notifications import.
No description

Delete File Confirmation

Hi - is it possible to have a confirmation before removing a file that has been uploaded. I can hide the delete button completely by calling ->deletable(false). However, I have a scenario where users can delete files, but it would be nice to have a confirmation before doing so. Thanks...

Component with Wizard and overflow shifts content out of the screen

I have a custom livewire component with HasSchema, and a Wizard with 4 steps. The Wizard is completely a form. My parent view (layout file) has overflow-hidden on the body. When i complete step 1 in the wizard and click next, the layout shifts up and left. Out of bounds of the screen. Giving me white space on the right and bottom, and unreachable content top and left. When i change the body tag to overflow-x-hidden, the samething happens, but the content only shifts to the left, not up....

Repeater open conditionally.

Is it possible to open a repeater conditionally? For example, when a modal form opens and it contains several repeater items that are collapsed by default — is there a way to have one repeater item open while the others remain collapsed? If yes, how?
Solution:
Found a solution ``` ->collapsed(function (Livewire $livewire, ?ComponentContainer $item): bool { // When creating, keep items expanded if ($livewire->mountedActionName === 'create') {...

Delete action inside modal - alignment

Did anyone succeed in achieving this kind of layout? I'm tryinf to add delete action inside the edit modal, and I want it like it's in the picture, but I can't get it to be like that....
Solution:
```php Action::make('yourAction') ... ->modalCancelAction(false) ->extraModalFooterActions([...
No description

Removing default classes on a component

So the html for a section contains classes for ring-1 etc, but I want to remove the ring and shadow for a particular section. I've tried using extraAttributes but that obviously doesn't override existing. Is it possible to do so without having to change the blade entirely?...
Solution:
Nevermind, custom css did work, I just had the wrong class name 🤦‍♂️

`Builder` with `ActionGroup` inside `extraItemActions()`

Is there a way to use an ActionGroup inside the extraItemActions of a Builder Form Component? I get this error: Method Filament\Actions\ActionGroup::getName does not exist. Code: ```php...

How to set the Roles navigation

this was the default settings from: php artisan vendor:publish --tag="filament-shield-translations" ```php 'nav.group' => 'User Management', 'nav.role.label' => 'Roles',...
No description

How to handle Filament assets (commit or rebuild?)

Hi everyone, When installing Filament, it automatically adds some assets (JS, CSS, fonts, etc.) to the public/vendor directory. I was wondering what’s the best practice regarding this: ...

ViewEntry Style doesn't work

Why is the styling inside the ViewEntry doesn't work?
Solution:
I just created a new theme and it worked

Testing tenant-aware resources in v4

What I am trying to do: I'm trying to test the creation of a tenant-aware resource. I've just updated my application from version 3 following the upgrade guide. The tests were working fine before the update, but now I'm getting an error related to a missing tenant ID in insert queries. What I did:...

I have to double click buttons to continue?

Not really a emergency, but trying to help out a friend using Filament, right now, he has to double click his form buttons for them to trigger, after being inside a input field. Its simple form however, not sure what is causing this? Hitting enter works fine....

Problem with RepeatableEntry\TableColumn in V4?

I am following the documentation here: https://filamentphp.com/docs/4.x/infolists/repeatable-entry#table-repeatable-layout However, I am getting an error: Class “Filament\Infolists\Components\RepeatableEntry\TableColumn” not found ...
No description

How to automatically update repeatableEntry after form save

In v3, after saving a form, repeatableEntry would automatically update itself with the new data, this is not the case in v4, how do I do it.
Solution:
$this->record->load('message'); // reloads the message relationship from the database
$this->refresh(); // refreshes the Livewire component to show the updated data
$this->record->load('message'); // reloads the message relationship from the database
$this->refresh(); // refreshes the Livewire component to show the updated data
...

Help: Can't get form value in edit page

How can I get the 'correct_option' value in edit page when I set it in repeater. I used $this->data in edit page but the value of correct-option is always null...
No description