Returning Action in renderHook
In v3 you could return an
Action::make()->render()
in a renderHook
but with v4 it complains about the iconPosition not being set (views/components/buttons/index.blade.php:38)
I know i could make a livewire component, but for a simple action it seems overkill.
Anyone got any ideas how to render an Action in a hook?
6 Replies
What about setting the icon position?
I would have thought icon position would have a default though
same issue even with iconPosition set, and with ->icon(null)
I guess there is more code to this?
no more code to it. just as simple as rendering an action as the result of a renderHook breaks it.
created an issue here
https://github.com/filamentphp/filament/issues/16571
GitHub
Returning a rendered action in renderHook() shows iconPosition erro...
Package filament/filament Package Version v4 Laravel Version v12 Livewire Version v3 PHP Version 8.3 Breaking change description inside a renderHook, returning an Action with ->render() worked i...
So all you do is render an icon?
I don't think you are supposed to call
->render()
yourselfthe code is to render an action button. the idea being it could be a complex action
in the example it's just a url
i can render it differently if you know of a better way (i presume blade file or livewire component?), but was quite handy to just render an action in a renderHook that worked on v3