John
John
FFilament
Created by Rappu on 1/22/2025 in #❓┊help
Relation Manager not loading sometimes
Hmm, I'm not sure how browser cache is involved in this. Only thing I can come up with is that you're missing "key" fields on certain Livewire components / parts so it cannot match the client parts with new server parts?
4 replies
FFilament
Created by Rappu on 1/22/2025 in #❓┊help
Relation Manager not loading sometimes
Are the relation managers lazy loaded (which is default)? Maybe disable that to "fix" your problem?
4 replies
FFilament
Created by John on 1/8/2025 in #❓┊help
Spatie Translatable + #[Reactive] RelationManager + Lazy loading bug?
I allready added an issue here: https://github.com/filamentphp/filament/issues/15301, including reproduction repo
4 replies
FFilament
Created by roy21 on 8/12/2024 in #❓┊help
How to Set FiltersLayout::AboveContentCollapsible to be expaned by default
(or better yet, also store the collapsed state when you persist filters in session)
6 replies
FFilament
Created by roy21 on 8/12/2024 in #❓┊help
How to Set FiltersLayout::AboveContentCollapsible to be expaned by default
That's not collapsable. We want collapsible, but expanded by default.
6 replies
FFilament
Created by roy21 on 8/12/2024 in #❓┊help
How to Set FiltersLayout::AboveContentCollapsible to be expaned by default
I'd like this too. Did you find a solution?
6 replies
FFilament
Created by Chriis on 10/26/2023 in #❓┊help
Using $record into beforeCreate() method
Maybe this changed in v3, but now you'd need $this->data.
5 replies
FFilament
Created by Xiaohou on 10/14/2024 in #❓┊help
How to refer to filament semantic color in blade file?
I was looking for this too, and came to the same conclusion. I borrowed some code from vendor/filament/forms/resources/views/components/field-wrapper/hint.blade.php and added this:
// resources/views/components/colored-content.blade.php
<span
class="fi-color-custom text-custom-600 dark:text-custom-400"
@style([
\Filament\Support\get_color_css_variables(
$color,
shades: [400, 600],
),
])
>
{{ $content }}
</span>
// resources/views/components/colored-content.blade.php
<span
class="fi-color-custom text-custom-600 dark:text-custom-400"
@style([
\Filament\Support\get_color_css_variables(
$color,
shades: [400, 600],
),
])
>
{{ $content }}
</span>
// Inside some Filament resource method
return new HtmlString('Add some '
. view('components.colored-content', [
'color' => 'danger',
'content' => 'CoLoR!'
])->render());
// Inside some Filament resource method
return new HtmlString('Add some '
. view('components.colored-content', [
'color' => 'danger',
'content' => 'CoLoR!'
])->render());
8 replies
FFilament
Created by Maxxx22 on 10/27/2023 in #❓┊help
Repeater: show delete button on each line conditionally
I'd really like this too. I'm considering a toggle component inside the repeater schema that marks the item for deletion when saving, but that's also not optimal.
3 replies
FFilament
Created by PabloZagni on 8/4/2024 in #❓┊help
Persist sort order
Maybe this functionality was added later? But this is plain Filament:
// Resource class
public static function table(Table $table): Table
{
return $table
->persistFiltersInSession()
->persistSortInSession()
->persistSearchInSession()
// ...
}
// Resource class
public static function table(Table $table): Table
{
return $table
->persistFiltersInSession()
->persistSortInSession()
->persistSearchInSession()
// ...
}
64 replies
FFilament
Created by Benjamin on 10/11/2023 in #❓┊help
Can't edit a resource if viewAny() is false (Model Policy)
I had a similar case, and ended up with viewAny: true and a global scope on the model to limit access.
6 replies
FFilament
Created by Cow on 11/27/2023 in #❓┊help
`FilamentColor::register()` having no effect (icons are same color as text)
Please note that you can also override the colors per panel using:
class AdminPanelProvider extends PanelProvider
{
public function panel(Panel $panel): Panel
{
return $panel
->colors([
'primary' => Color::Amber,
//...
]);
}
}
class AdminPanelProvider extends PanelProvider
{
public function panel(Panel $panel): Panel
{
return $panel
->colors([
'primary' => Color::Amber,
//...
]);
}
}
That was causing the register primary color change "not to work" at my end.
8 replies
FFilament
Created by John on 10/3/2023 in #❓┊help
Custom field with multiple checkboxes
Eventually I found out that I can use @foreach ($getChildComponents() ...
@foreach ($getChildComponentContainer()->getComponents() as ...)
@foreach ($getChildComponentContainer()->getComponents() as ...)
in the custom layout component blade, instead of {{ $getChildComponentContainer() }}. Now I can apply my custom layout/styling "inside"/"between" the default or custom components provided by ->schema([...]), instead of only "around" the fully rendered set of child components.
22 replies
FFilament
Created by John on 4/10/2024 in #❓┊help
Moving route registration removes theme css styling
Is there something magic about getPages() that makes custom styling work? I'm still stumped...
9 replies
FFilament
Created by John on 4/10/2024 in #❓┊help
Moving route registration removes theme css styling
Any clue?
9 replies
FFilament
Created by John on 4/10/2024 in #❓┊help
Moving route registration removes theme css styling
I've restarted npm run dev and run artisan optimize:clear
9 replies
FFilament
Created by John on 4/10/2024 in #❓┊help
Moving route registration removes theme css styling
After some more investigation: Every request hits Filament::registerViteTheme() in service provider. Also the broken theme request. But; the broken page only loads /filament/assets/app.css?id=ceb9a486dfc44ebe8adaa3bd510821e8 in network tab. While all other pages load http://[::1]:5173/resources/css/filament.css (and a bunch of custom stuff I put in the service provider).
9 replies
FFilament
Created by John on 4/10/2024 in #❓┊help
Moving route registration removes theme css styling
So next step is tenantConfig()->registerRoutes() which is a helper to get current tenant. But even directly in web.php fails.
9 replies
FFilament
Created by John on 4/10/2024 in #❓┊help
Moving route registration removes theme css styling
Ultimately I want to register routes depending on the current tenant.
9 replies
FFilament
Created by egmose5492dk on 4/10/2024 in #❓┊help
Only access to certain resulsts in resource - How do i limit that?
->contains('marina_id', $marina->id) looks suspicious
3 replies