Add action to the livewire component
I'm using this livewire component: https://filamentphp.com/docs/2.x/tables/getting-started#preparing-your-livewire-component to display the list and wanted to add an Action before the list.
I've tried with adding a custom code to the blade before but not worked.
This will be the same process as the Filament resource but it'll not possible in my case because I'm using a Filament view resource and into that, I've used the livewire component in the Tab section.
Filament
Getting started - Table Builder - Filament
The elegant TALL stack table builder for Laravel artisans.
14 Replies
please clarify: send code, tell us what "not worked"
also send a screenshot hinting at what you're trying to do
My livewire component file is attached. I wanted to add an action button before the list
But, the Action button to make a new document is not displayed.
You need
<x-filament::page>
as a wrapper around you table. Check the list-records.blade.php
or edit-record.blade.php
for referenceOk, let me try
I'm getting this error as of now, the updated code is attached.
Please don't screenshot error messages and share a Flare url as stated in #✅┊rules
Sorry!
Error: Call to a member function getName() on array
On line: {{ \Filament\Facades\Filament::renderHook('resource.pages.list-records.table.end') }}
That not a Flare url 🤷🏼♂️ Did you read #✅┊rules ?
Flare
Call to a member function getName() on array - The error occurred at http://localhost:7403/properties/view/11
What does your
livewire.document
view look like?
Ah wait it's in the Flare error
Can you remove both Filament::renderHook()
calls from your blade view if you don't need them?Still getting same error
The error is from the mounted Action which I've added in the component to show the action button.
The error is from the mounted Action which I've added in the component to show the action button.Can you show that code?
Yeah sure.
Method: getMountedAction()
Not sure where you found
getMountedAction()
. I don’t think we have that in the docs.