exactwebitesolutions
Render table component without a view
Is it possible to build a Filament table without a view file?
Tried using Blade render but getting error:
Using $this when not in object context
From inside <x-filament-tables::reorder.handle />
5 replies
Edit select form throwing error if not exists
If the select contains a value which does not exist in the relationship option then it throws
Filament\Forms\Components\Select::getEditOptionActionFormData(): Return value must be of type array, null returnedHow to hide the form an show empty select. Tried this but still throws the error. If there are invalid data in the database e.g test_id=123 and this does not exist in the database, then the error is thrown when using the edit form
5 replies
Change the active relation manager tab
Is there a way of accessing the parent Resource from inside a RelationManager?
E.g I want to change the tab after this action has been called but > Property [$parent] not found on component
I found
$livewire->getPageClass()
but this only returns the string6 replies
Table columns support extract json?
Is it possible to extract a json data column into multiple filament table columns? e.g
data
= "{'foo':'yes', 'bar': 'no'}"
I know this can be done manually via the modifyQueryUsing and adding a raw select, just wondering if Filament has a handy way of doing it?2 replies
Single FileUpload inside state path saves differently as json
Not sure if this is intended behaviour but the file upload with single upload is saving as json with a random key when it's used inside a statePath.
E.g
image = "icon1.svg"
extra = "{ 'image': {'123':'icon2.svg'} }"
Tried to fix with afterStateUpdated but it's never called.
11 replies
Using suffix/prefix with html string
Adding a suffix looses the HtmlString object so it performs sanitization removing the tooltip.
This is a simplified example to show the issue we're actually overwriting the suffix for custom logic adding icons.
1 replies
Force deleting record error $record must not be accessed before initialization
When I delete a record the page shows an error before redirecting.
Typed property Filament\Resources\Pages\EditRecord::$record must not be accessed before initialization
7 replies
How to load migrations for a test from inside a package?
Using the standard Filament plugin service provider by Spatie where the migrations are stored in
.php.stub
without the timestamp prefix.
But how do you load the migrations in order for testing?
I don't want to duplicate them and have tried passing the exact file paths but this gives the error:
The "1" argument does not exist. at vendor/symfony/console/Input/ArrayInput.php:188
6 replies
Add alpine data to filament modal
Is there a way of accessing the
x-data
from inside the header slot?
If I add x-data to x-filament::modal I get error with
can't access property "dispatchEvent", this.$refs.modalContainer is undefined
3 replies
Default sort direction for a column - descending first
To improve the UX I wanted to change how the ‘Updated at’ timestamp are sorted descending on first click of a column.
I know you can change the default order for the whole table but here I'm referring to the individual column sorting - when you click on a column.
On first click of a timestamp column you most likely want to see the recent first, and not oldest.
If I reverse the direction in the query it kinda works but the label/arrow are incorrect.
2 replies