Filament

F

Filament

Filament is a collection of beautiful full-stack components for Laravel.You can get help using it on our Discord.

Join

Triggering afterStateUpdated() with $set()?

Hi, I'm trying to to use the afterStateUpdated() method on a TextInput Field, that has been updated/filled by the $set() method from another field. Updating the value using $set() does not seem to trigger the afterStateUpdated() method (unless I'm doing something wrong). Is this not possible? Or how can I achieve this?

Disabling topbar - how to opensidebar on mobile

Hey everyone, I noticed a strange behaviour. If you disable the topbar, you can't get access to the sidebar on mobile. Is this expected? How would you go around this?...

table filters are not working when i customized getEloquentQuery()

public static function getEloquentQuery(): Builder { // Apply custom authorization and query modifications if (!auth()->user()->can("viewAny")) { $subordinateIds = auth()->user()->subordinates()->pluck('id');...

Pass Htmlable to TextInput suffix

Hi, I am trying to understand why passing Htmlable to TextInput->label() will render the HTML, whereas passing Htmlable to TextInput>suffix() will show the HTML source code. Where in the source code is this implemented? Is the type hinting of suffix incorrect for hinting it as accepting Htmlable ? (I found that elements which use CanFormatState will render the Htmlable in the call to formatState. But form components don't seem to be using CanFormatState)...

Reorder Table With Label Beside Button

Hi guys, I was wondering if there is option to add label "Reorder" next to reoorder icon?
No description

Accessing table filter

Anyone knows if it is possible to access table filter from infolist ?
Solution:
Yes, I did access livewire from the info list with $livewire = Livewire::current(). So I extracted data from table filters with $livewire->table filters['filter_name']. Thanks for the follow up....

can i add some data in chart hover?

can i add some data in chart hover ?
No description

Not an error but a question for an issue

Hi, I want to make a resource that is not relying on a model, it meant to handle some things within static data that need to be saved in caching for a while, is there anyway for? Thanks in advance
Solution:
Make a filament page in the panel for your custom logic. https://filamentphp.com/docs/3.x/panels/pages#overview...

Table action modal freezes and searchable does not work

public static function table(Table $table): Table { return $table ->heading("Evènements") ->description("Liste des évènements")...
No description

FOOTER COLUMN

how can I create a column with the bottom position and other table data above it, the data at the bottom is the result of adding up the total prices

Format state on empty column

I have table with width, height and length parameters. When showing this in the table, I want to add a size column That shows width x height x length. ```php Tables\Columns\TextColumn::make('width')...

New panel custom file structure discovery problem

I created a new panel and set up a custom folder structure for the panel to discover the files. I used a wildcard because some folders have different names. The problem is that if the Resources, Pages, or Widgets folders are missing, it throws an error. Additionally, I generated a new resource, placed everything in the correct folders, but it still throws an error saying that it cannot find the file, even though the file exists. Has anyone faced this issue before? I am using the discovery function like this: ``` ->discoverResources( in: app_path('Domain/*/Filament/Resources'),...

Optimize duplicate queries in 2 method at the same TextColumn Class

Can someone help me to optimize with this case, TextColumn::make('jenisDonasi.nama_jenis') ->tooltip(function ($record) { if ($record->campaign) {...

Sticky Action Column

Is there any solution about this I need to do something like this pic because I have to much columns and I need to be shown always the actions
Solution:
```css .fi-ta-header-cell:last-of-type { @apply relative right-0 top-0 bottom-0 bg-red-500; } ...
No description

Split in table

Hello all, I have a column in table which contains a photo, name and email, now I want to show them as the attached photo (image on the left and text in the right). Anyone can help?...
No description

Wizard not submitting data on final step

Hi. I'm having a problem with a Wizard. It has four data entry steps and a final Review step consisting of just placeholders. I need to customise the model creation process at the end which I'm doing with handleRecordCreation in my Page class. If I include the final Review step, the $data being supplied to the Page class is empty. If I remove the Review step, the $data contains everything from all steps....
Solution:
aha - it wasn't that but it did point me in the right direction. The problem was not the uniqueness of the Placeholder name, it was using the same name for Placeholders as the Form state name. So using Placeholder::make('name') killed the form state for TextInput::make('name'). thanks for taking the time to look...
No description

Achieving Roles & Permissions in Multi-Tenancy

Hi everyone, How to achieve roles and permissions in a multi-tenancy environment. Thank you so much in advance....

Attach & attach another action label in relationship attach modal, can it be changed?

The concept of attaching and detaching is confusing to some of my users, however, they are the default options shown for any actions on a many-to-many relationship manager on a filament resource. I tend to change them to Add and Remove to make it clearer. I am able to change the text pretty much everywhere except for the "Attach & attach another" button in the modal. The singular "Attach" button is changed to "Add" in the screenshot using "modalSubmitActionLabel" method, but it doesn't also change the other submit button "Attach & attach another". Can anyone suggest how I might do this?...
No description

custom table bulk action assign to a customer screen become unresponsive

When selecting 20000+ records for from my number resource to assign a customer screen become unresponsive