HeaderActions in Component (not Resource)
Ciao helpful Filament Community
I am trying to add a headeraction to a table.
This works fine in a class that extends Resource (first and second screenshot).
But in another project i have a different structure and i want to set a headeraction in a Class that extends Component (third screenshot).
This headeraction inside a component class is shown in a strange way and i cant set a label or color.
Also my npm run dev is showing a warning which could be a hint for the problem but i dont know:
"(node:13620) Warning: An error event has already been emitted on the socket. Please use the destroy method on the socket while handling a 'clientError' event. (Use
"(node:13620) Warning: An error event has already been emitted on the socket. Please use the destroy method on the socket while handling a 'clientError' event. (Use
node --trace-warnings ...
to show where the warning was created)"
Can someone tell me why i cant use headeractions inside a Class that extends Component instead of Resource?
And maybe tell me how the correct way would be?
Thanks alot in advance8 Replies
Additional Information:
I want to use a table as described here: https://filamentphp.com/docs/3.x/tables/adding-a-table-to-a-livewire-component
But with a ->headerAction([])
Bump
According to the docs that looks right though.
Make sure you imported all the right classes.
Thanks for the reply. @awcodes
I am quite sure we installed all the classes but i will doubleCheck.
Are you able to add an action to headeractions in a component without this strange visualisation?
working fine for me
Looks like it's just not getting the color applied.
π so it seems the problem is just in my setup and i have to deppDive into the classes to find the missing installation.
Just to make sure: Your example is inside a (class extends) component and not inside a (class extends) resource isnt it?
correct it was in a custom livewire component