VortexTrumpetHat
VortexTrumpetHat
FFilament
Created by VortexTrumpetHat on 10/23/2024 in #❓┊help
Select::createOptionForm fill?
I have an Action with 2 wizard steps. The first step contains a Select input with a createOptionForm from another resource. How can I fill in some values to this form based on the current record? Minimal example (with some details removed for brevity):
Forms\Components\Select::make('assigned_user_id')
->relationship('assignedUser', 'name')
->createOptionForm(function (Form $form) {
return UserResource::form($form)
->fill(['name' => 'testing']); // This is not working??
})
Forms\Components\Select::make('assigned_user_id')
->relationship('assignedUser', 'name')
->createOptionForm(function (Form $form) {
return UserResource::form($form)
->fill(['name' => 'testing']); // This is not working??
})
2 replies
FFilament
Created by VortexTrumpetHat on 6/10/2024 in #❓┊help
Render SimplePage without route?
Is it possible to render a SimplePage which does not have a route? For example, as a view response to an exception?
16 replies
FFilament
Created by VortexTrumpetHat on 6/10/2024 in #❓┊help
Return SimplePage as response for middleware exception?
I'm looking for the best/proper way to render a custom SimplePage class if middleware exception is thrown. I've tried returning the response()->view('path.to.simplepage.view') but receive an error Using $this when not in object context (presumably because the <x-filament-panels::page.simple> is not getting initialized properly) I've also tried: return response()->view((new MyCustomSimplePage())->render()) but the same error is given.
1 replies
FFilament
Created by VortexTrumpetHat on 1/10/2024 in #❓┊help
Multi-tenancy panel giving 404
I have followed the instructions for setting up multi-tenancy on https://filamentphp.com/docs/3.x/panels/tenancy The tenant class is extending JetstreamTeam, and the tenant registration page and profile page are created from the docs. When I login and register a team, the team is successfully created but when it redirects to /admin/{new_team_id} it results in a 404?
5 replies
FFilament
Created by VortexTrumpetHat on 1/8/2024 in #❓┊help
Notifications transition glitches in Firefox
Has anyone else experienced the Notifications panel slide out and "overshooting" then abruptly snapping back to the side when opening in Firefox (i.e. clicking the bell icon)? I don't notice the problem in Chrome or other browsers.
3 replies
FFilament
Created by VortexTrumpetHat on 1/5/2024 in #❓┊help
Simple searchable field causing Alpine warning + table.js error?
I have a fresh Filament v3 project with a model & resource. The resource has a single TextColumn field marked as searchable(). Whenever I perform a search in the search box I receive a warning + 2 errors in the console.
Alpine Expression Error: this.$root is undefined
Expression: "const recordsOnPage = getRecordsOnPage()
...

Uncaught TypeError: this.$root is undefined
getRecordsOnPage http://filament-v3.test/js/filament/tables/components/table.js?v=3.1.35.0:1
...
Uncaught (in promise) TypeError: this.$root is undefined
getRecordsOnPage http://filament-v3.test/js/filament/tables/components/table.js?v=3.1.35.0:1
...
Alpine Expression Error: this.$root is undefined
Expression: "const recordsOnPage = getRecordsOnPage()
...

Uncaught TypeError: this.$root is undefined
getRecordsOnPage http://filament-v3.test/js/filament/tables/components/table.js?v=3.1.35.0:1
...
Uncaught (in promise) TypeError: this.$root is undefined
getRecordsOnPage http://filament-v3.test/js/filament/tables/components/table.js?v=3.1.35.0:1
...
It seems strange to be getting an error on such a simple setup. The search appears to be working correctly, but every time the search text is modified the console spews out warnings and errors? Any help would be greatly appreciated. I'm hoping it's just something simple I'm overlooking.
4 replies