How to override `getRecord()` and/or `getLivewireClickHandler()` for an action
No matter what I do in
->getRecord()
on my action, I get an error saying Call to a member function form() on null
4 Replies
What kind of action?
Maybe provide some example code of what you have tried.
I've also tried
but I get
Typed property Filament\Tables\Actions\Action::$table must not be accessed before initialization
I've also tried overwriting ->getLivewireClickHandler()
directly but that hasn't worked either
The issue I have is that I wrote a custom union to use for a relation manager table. It returns the data correctly but the actions in each row are getting messed up and returning the wrong record when clicked
I use standard incrementing IDs in each table
So basically, I'm trying to either override the setting of the $record
or customize the getLivewireClickHandler
so I can add additional parameters to the requestAh, OK. Yeah, I can't help with that. If it's two entirely separate tables you are doing a union on in an RM, I can see all kinds of nasty gotchas lurking under the hood which will bite you. Round peg, square hole.
Would using UUIDs instead of regular integers help by any chance? I know I can put these in separate RMs, but I'd like to keep them combined if possible
Nevermind - I'm changing how the two different types of orders are created so that they can be used naturally in one RM