Filament

F

Filament

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

Join

Hide empty tables

When using relationship managers is there a way to make the table not render if there are no records. Thanks, Damien....
Solution:
like Dennis said, this doesn't make sense if you are using header actions to create or attach a record. Anyway, if you want to hide it, I think you can use getRelationManagers in your Edit or View page: ```php...

Help wanted: Upgrade to Filament v4 – mention functionality

n Filament v3, I used the RichEditor’s id attribute to append mentions dynamically. But in v4, the RichEditor no longer provides an id, which makes it tricky to target the editor for custom mention behavior. https://github.com/AsmitNepali/filament-mention/issues/25...

is spa() broken on filament 4?

I'm getting Uncaught TypeError: can't access property "noConflict", jQuery is undefined and Uncaught SyntaxError: redeclaration of const loadDarkMode, resulting of not being able to open modals or switching the theme

Using colours in a blade file

I'm trying to use the bg-green-300 colour in my blade file. ```<div class="flex items-center justify-center"> <span class="text-sm text-gray-500 mr-1">{{ $day }}</span> <div @class([...

TipTap RichEditor: "flatten" or navigate tree for text validation

When implementing a custom validation rule for a RichEditor with a signature like fn(string $attribute, $value, Closure $fail), under Filament v3 with the Trix editor, the $value contains a string representation of the editor's content; with Filament v4 (TipTap), it's a tree structure with nodes for text, images, paragraphs, and so on. Is there a way to restore the v3 functionality, where the validation rule can access the entire contents as a string? If not, can anyone point me towards documentation of the tree structure used by TipTap so I can implement logic correctly examine each text node?...

V4 Money Format TextInput?

I've noticed in V4, the existing code only renders values without decmials. For example: ```php TextInput::make('total_lump_sums') ->label('Total Lump Sums')...
No description

refresh select filter that uses an attribute

I have a SelectFilter which filters upon status as follows: ``` SelectFilter::make('status') ->label('Status') ->options([...
Solution:
maybe you can inject array $data? You can also use custom filter forms...

Is it possible to give a custom Param to the Delete Modal?

Hey guys, i wanted to give a custom Param to the delete Modal, so it does not show my ID. Is that possible? I'm using V 3.3.34 ...
No description

Filament4 'Adding “anonymous” actions to a form without attaching them to a component'

Hello, I have just updatd my project to v4 and one thing has stopped working , which is 'anonymous' in my form schema. The following error is produced when i click the action button Unable to call component method. Public method [mountAction] not found on component...
Solution:
OK, the fix was... adding HasActions and InteractsWithActions trait to my livewire class

Table expandable content creating whitespace

Hi, I'm trying to create some expandable content. However the upper row, is not not taking the full available space anymore, and I have no Idea how to fix it. ```php ->columns([ Split::make([ Tables\Columns\TextColumn::make('account_ref')->label(__('Account Ref')),...
No description

Preventing StatsOverviewWidget from refreshing after every table action

What I am trying to do: I want to show a custom ContactStatsWidget (extending Filament\Widgets\StatsOverviewWidget) in my resource page footer alongside my main table. It should only query once when the page loads, not every time I run an action on the table (like adding a guest). What I did: ...

panel Appears Unstyled After Adding Custom Theme with Vite

Hello , I'm facing a specific issue while trying to apply a custom theme in Filament 4.x on an existing project and would appreciate some guidance. The Problem...
Solution:
Thank you so much — that was exactly the issue. Adding @tailwindcss/postcss to my postcss.config.js fixed it
No description

Filament Import Fails , Using `Admin` Model instead of `User`

--> Full Issue description in the text file in comments Brief: What I am trying to do: - Import a CSV into a Filament resource via ImportAction (queued ImportCsv job), updating existing DailyGift rows by day....
Solution:
After some research i have solved this problem using : ```php // AppServiceProvider use Illuminate\Support\Facades\Route; ...

TipTap merge tags with HTML

Is it possible to put HTML in the merge tag replacements for the tiptap editor? Seems like it's always escaping whatever I put in.

Can dashboard page react to filters?

Hello, I am currently building a custom dashboard that has filter, with use HasFiltersForm; and have added some simple toggle buttons to the filter ("today", "last 7 days", "last 30 days"). that sort of thing. The widgets are reacting with the filter with the use of use InteractsWithPageFilters; However i want to display some basic text to let the user know the date period that they selected. Since the dashboard has no blade file (that I know of), is there anywhere I can hook this information? besides putting them on individual widget itself which will clutter it with dates....

`->in()` validation doesn't seem to work with Select

From what I can tell, the ->in() validation doesn't work with select, unless there are "changes." So if you open a form and the select input already has an option, this will mean there are no changes and in() will fail. You have to reselect your option by clicking a different one, then the original again. This seems to defeat the purpose of in() validation ```php...

Tabs in TableWidget

Hi everyone! I was working on a TableWidget and wanted to implement the Tabs functionality similar to what's available in ListRecords. After some digging, I realized that TableWidget doesn’t support Tabs out of the box, so I had to do quite a bit of work—exploring traits and manually implementing the necessary methods. It took some effort, but I finally got it working! However, I have a question:...
No description

Trying to understand the layout system.

Hey While trying to update a plugin I ran into a layout issue. I want my Field to be full width but can't make it happen. My code is like this: ```php...
Solution:
->columnSpanFull() on the first Grid
No description

columnSpan on filtersForm() in Page shows no effect

When defining the ->columnSpan() on a filtersForm in a custom Page show no effect in screen sizes lg an higher. The Filter is always 1 column in width.