Filament

F

Filament

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

Join

Disable RichEditor images

Is it possible to disable images in a RichEditor so if the user tries to drag-and-drop or copy paste content with images the editor would not add the images to the editor content?

Hide a table column if its in a relation manager.

How would I go about it in Filament v4? So I have ProductResource and ProductItem Resource. I have a relation manager for ProductItems in ProductView page, but since its using the same table from ProductItem, its also showing the columns of the parent (Product), which can already be seen on top on the view page, hence making it redundant.
Solution:
Found it.
->hidden(fn ($livewire) => $livewire::class === ConsumersRelationManager::class)
->hidden(fn ($livewire) => $livewire::class === ConsumersRelationManager::class)
...

MarkdownEditor will save to local disk but not S3

So this is probably a stupid question, but I'm banging my head against the wall here and I'm not really sure where else to look. I have a MarkdownEditor component that I want to accept images within. If I don't set a disk with ->fileAttachmentsDisk(), it effectively saves the file as soon as I drag the image onto the editor pane. Once it's been saved, it shows up immediately in the editor pane, exactly as you'd expect, on the local disk storage, etc. My problem is that if I try to set the component to store to the disk called "s3" by doing ->fileAttachmentsDisk('s3') on the MarkdownEditor component - which works perfectly fine throughout the rest of the Admin Panel in the form of various SpatieMediaLibraryFileUpload::disk('s3')->... elements - dragging an image on the pane does "nothing". I say "nothing" in quotes because I can see traffic in DevTools and it's doing something but no file ever actually ends up in S3, and no file shows up in the editor panel, confirming that something probably went wrong but no exceptions are being thrown....
Solution:
Ok I was able to solve the problem by doing a couple things: 1. In my config/filesystems.php file, I set 'throw' => true on the S3 disk so I could see the actual upload exception 2. The exception being thrown was (unsurprisingly) League \ Flysystem \ UnableToWriteFile but the error message went into more detail about the problem which helped: ```...

Plugin header image

Hi, I’m having an issue with the header image for my plugin in Filament, it’s not showing up. Could you please tell me what I did wrong or why it isn’t working? Here’s the plugin: https://filamentphp.com/plugins/rich-editor-fullscreen...
No description

Weird relation manager CreateAction behaviour

My relation manager's create action is constantly trying to put audit_id as (1), instead of the id of the audit (17) for which the agenda is being created. I have never ever encountered such an error and I have no idea what I am doing wrong. Can someone help me out? Here is the DB error:...

Section & manual collapsed via custom headerActions ... Is this a bug?

Hello, I have a "Section" with custom headerActions... When I click on an action, I want to change the state of the section I tried several methods, but it doesn't work....
No description

Overwrite asset_url from tenant middleware?

Is it possible to overwrite the config urls, so I can avoid cors errors? So far I tried this, but I assume tenantMiddleware is called too late or something else? ```php...

loading animation

how i can add loading animation appear in page in any process not just on the button ?

Do not run BulkAction for any records if some do not pass policy validation

Hey Filament Discord! First of all, huge thanks for all maintainers of this package. I have a question regarding bulk actions. I saw that it is possible to individually authorize them for each record, which is cool: ```php BulkAction::make('do_some_stuff')...

How to make a parent sidebar item non-clickable (header only that expands/collapses children)

I want a sidebar section whose parent item has an icon and (optionally) a badge but no URL, so it acts only as a header to expand/collapse the child resources—similar to the second screenshot below. Right now my parent is clickable and navigates somewhere (first screenshot).
No description

Async InfolistEntry

I thought I stumbled once upon a trick to async load some data after the initial pageload. I.E.: I'm doing an ai summary and dont want that external api-call to block the rest of the view. Is there a built in way to do so?...

css looks wierd after upgrading to V4

Hello everyone, im trying to upgrade my Filament app to V4. But i cant seem to get the css to work while i followed all the upgrade steps. Can someone help me....
No description

Turning resources into routes

I have previously made a fully working website which has it is own sidebars and everything is working without filament but now I got task to just merge it to filament project that uses filament sidebar but to not remake all my components into filament. So basically ignore everything filament has to offer and when I add resource like announcements instead of filling it with stuff just route to my views that have announcements

Repeater add/remove item causes form re-render and js modified values reset to defaults

I have a VANILLA JS calculation in a filament form because I want to calculate without backend requests. I have repeater on the page and when I add/remove item from the repeater it triggers update request which re-renders the form and my js calculated values are gone. Example: I have 3 inputs (x,y,z) one of them (z) is disabled and is calculated via js. x*y=z I want to save all 3 of them into the db. If I change x or y I calculate the rezult and put the value into z....

TextColumn with nested relationships - How to display unique values?

Hi everyone! 👋 I'm working with a TextColumn that displays data from a nested relationship (MorphMany → BelongsToMany), and I need to show unique user names. My setup:...
Solution:
fix with: TextColumn::make('organizationalActivities.users.name') ->distinctList() ->searchable() ->sortable()...

Regression in `Repeater` after updated from `v4.0.18`

After upgrading from v4.0.18 to v4.1.0 I have observed that I cannot delete item from Repeater, also observed that DeleteAction does not fire ->action() when the delete button pressed. I have rolledback to v4.0.18 and the problem is solved, then I have updated to v4.0.19 and the problem is there again. I have cleared all the caches using ```js php artisan optimize:clear...

Repeatable entry using table error like this

Hi my repeatable entry table mode showing like this idk why this happen. ``` <?php namespace App\Filament\Resources\Clients\Schemas;...
Solution:
it working, I'm using
->columns(1)
->columns(1)
thank you!...
No description

Development License

Hi! I would like developers to be able to install our backend dashboard on their machines while they develop with Filament and its plugins. It seems, however, that there's only one license granted. This means that we'd have to distribute our license key to developers, which is not good. How should I go about maintaining prod license key privacy, while allowing engineers to install Filament for development?...

Rich Editor: why does a null state become a paragraph? Working on a PR for forced content structures

Hi! I am currently working on a PR to support forced content structures (as seen in https://tiptap.dev/docs/examples/advanced/forced-content-structure) in the Rich Editor which will allow you to do something like this: ```php...

Nested schema in filament v4

Good day everyone, I’m new to Filament and I’d like to ask if it’s possible (or allowed) to use a nested schema function inside another schema. Here’s my current setup. I created a tasks schema that returns a table:...