Filament

F

Filament

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

Join

Configure/Disable/Remove default Tiptap extensions

Hi, I'd like to configure or totally remove some Tiptap extensions that come with the RichEditor. ex: I want to disable highlighting, I'd like to customize some keyboard shortcuts, or want to remove any possibility of H1. How would you do that, as the extensions are statically added in forms/resources/js/components/rich-editor/extensions.js?...

Intermittent RichEditor error inside Repeater: Argument #2 ($rawState) must be of type ?array, strin

Hi everyone 👋, I’m running into an odd issue with RichEditor inside a Repeater (Filament v4). My description column is of type TEXT. Most of the time things work fine, but I noticed a pattern:...

ucwords all field values

A lot of my database content is stored lowercase. Is it possible to add something (maybe to AdminPanelProvider::boot() to make all values have ucwords applied to them?
Solution:
formatStateUsing instead of dehydrateStateUsing? ```php TextColumn::configureUsing(function (TextColumn $column) { $column->formatStateUsing(function ($state) {...

Navigation Groups in F4

Hi everyone, I’m working with Filament 4 and I want to control the order of navigation groups in the sidebar. I noticed there’s a property called: protected static ?int $navigationGroupSort = 2;...
Solution:
you can sort navigation group from panel provider file $panel ->navigationGroups([ 'Shop',...

How can I group permissions, show them to the user and save without exceptions?

What I am trying to do: I'm using the role/permissions package from Spatie. Each permission has a group and can belong to a role. I'm trying to display the permissions on the Create + Edit Role page. ...
Solution:
On our EditRole we do the attached.

Hide non toggable/reordearble columns from Column Manager

In Filament 4, the Column Manager appears automatically when any column is toggable or reorderable, but it shows the fixed columns too (although you can't manipulate them). Is it possible to hide the fixed columns completely from the Column Manager?

After clicking 'Apply columns' it is not redirected to list page. How can i redirect it ?

Solution:
I don't know if we have a better way to do that, but for now you could try some JS code to force close the panel Add this to your ListPage ```php...
No description

How can I hide this 'reset' button of column manager ?

Solution:
I don't think Filament has a method to override this action, but you can hide it using css. Create a custom theme and add this to your theme.css ```css .fi-ta-col-manager-header button {...
No description

How can I globally change the 'view' action color?

I'd like for it to be 'success' instead of gray. Can I do this globally or do I need to set ->color('primary') on every instance?

How to preselect a MorphToSelect?

I have a MorphToSelect::make('inspectable') and want to pre-fill it via url. In my CreateRecord component I use the mount() method. ```php public function mount(): void { parent::mount();...
Solution:
Nvm: The given id was filtered out via modifyOptionsQueryUsing 🙈 😆

View action modal not showing when using table widget.

public function table(Table $table): Table { return $table ->query( auth()->user()->offers()->getQuery()...

Create simple static page builder using Rich Editor

Hi there. I'd like to create a static page builder using rich editor & custom blocks. I've read the documentation but was wondering if some of you have some tutorials or examples already created and would like to share them? Thanks!...

Filament Export action and it's usage in report generation

Hello, earlier i have used one of the laravel plugins for xlsx generation from multiple tables to generate report of task execution. On that moment i'm trying to use export action for that task. I want to make the xlsx file with multiple pages with different data. First sheet may have different amount of columns and some merged cells. Second sheet has static amount of columns, but merged cells exists. Biggest part of values calculated by collection of records from multiple tables and is not linked to the columns in the DB tables....

Error while overriding the Login page

Hello guys 🙂 Maybe another dumb question, but I think I carefully read the doc and follow all the steps, and I'm actually getting this error:
Method App\Filament\Pages\Login::getCachedSubNavigation does not exist.
while trying to override the Login page....
Solution:
Ok problem found, if you want to override Login component, you need to use in your blade: ```php <x-filament-panels::page.simple> Hey!...

An issue with modals with Chrome on Windows

I've had a enduser report issues when selecting a modal action on a Table view. Here's what Sentry has to say. Seems like it's when attempting to attach a listener to the modal, seemingly that modal hasn't been created yet? 🤔 ```md...

Refreshing repeater data

I have a modal which has 2 repeaters. First repeater has the ability to add new data (organizations), and second repeater is reading data from the user's computed attribute (organizations_list). Thing is, when I upodate first repeater with new organization, the second repeater should re-fetch the computed property to display new organization. ...

Wizard step methods available in v4

I'm building a wizard - step 1 is uploading a file, step 2 is some validation and user decisions - step 3 needs to do things with the decisions made in step 2. So I'd like to do some processing when the user presses "next" to proceed to step 3 - but what methods are available (I don't see any) on that button - or what is the recommended way to implement this?...
Solution:
Wizard provides step lifecycle hooks You can also use $get in step 3 fields to retrieve the state (value) of another field from step 2...

passing action arguments into nested actions

I have an action with footer actions. In those footer actions I need $arguments from the mountUsing on the parent. Not sure how to obtain those arguments in the child?
Solution:
```php public function dayAction(): Action { return Action::make('day') ->label('Day Clicked')...

Is it possible to make options in column manager not selectable?

In your demo I saw a column manager that has options that can't be switched, is this a feature available in version 4 or can something similar be done in version 3? If so, how, I haven't found this method
No description

Modal Slider gets hides modal before requiresConfirmation on Action how top stop that

in the form action() i call another method on filament action called replacedMounthedActions coz if you just adding requiresconfirmation model dont work