How Add a widget to relationManager form
Is there a way to add a widget to the forms of a RelationManager?
I have attached a widget to a resource form through the EditPage:
This works so I added this method to the RelationManager.
no error and no widget.
Looking in Filament
RelationManager.php
there is no mention of widgets like there is in Resource.php
.
So what to try next?4 Replies
I use the PanelsRenderHook::RESOURCE_RELATION_MANAGER_BEFORE
The widget is living in app/Filament/Resources/{yourResource}/Widgets/ and has the name of your RelationManagerClass (if your RelationManager is HoursRelationManger than the widget should be HoursWidget)
Gotta try this! thanks
I tried : made a Trait as above and added that trait to the Relation Manager.. When I click on edit in the relation manager I get a 'loading ' icon the first time after refresh, then it opens the modal without the widget.
Are you sure that you are in the boot() function? I had this when i had it in the mount().
Yes it was on boot() still have to click 1x before it will allow edit.