Replies: 1 comment 3 replies
-
|
How have you tried registering the Livewire component? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I've discovered that the components of
Filament\Resources\RelationManagersuch asAttachRecordorListRecordsare capable of triggering their hook methods after some actions - this is exactly what I need in my current project. But I can't find out how to implement these hooks properly. I've tried overridingFilament\Resources\RelationManager::$componentsproperty and putting my own components in it, preserving original keys of the array, but once I define a namespace of a custom component under any key of the array and visit resource edit page, I get next error:"Unable to find component: []"
It is worth mentioning that all Filament files in my project are located in a custom directory as I use Lucid arch for building the app. With that being said, it may be pretty obvious that this happens because of the component not registered by the Livewire. I've tried registering my custom component using
Livewire::component()with no luck. So how to do it properly then?Just for any case, here is my custom component:
The
Filament\Resources\RelationManager::$componentsoverridden property looks like this:Ultimately, I would like to know, how to implement relation manager component hooks and what am I doing wrong if taken approach is correct. Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions