Set Table Actions Position in v2

Hello everybody. Guys, I need to change the position of the Row Actions to the beginning of the line instead of the end. I tried using the "getTableActionsPosition" method, setting it as "Position::BeforeColumns", but the actions continue at the end of the line. Does anyone know how to resolve this? Detail I'm using it within a Livewire component and I'm using Filament v2. Thanks.
No description
20 Replies
joao nivaldo
joao nivaldoOP9mo ago
Guys, does anyone know how to solve this, I've actually tried several things, but nothing makes the actions go to the beginning of the line. Remembering that I am using it on a Livewire component page and not on a Filament resourcePage. I already rebuild the accets and nothing either. I tried with this code that is in the documentation and it didn't work.
protected function getTableActionsPosition(): ?string
{
return Position::BeforeColumns;
}
protected function getTableActionsPosition(): ?string
{
return Position::BeforeColumns;
}
Albert Lens
Albert Lens9mo ago
use Filament\Tables\Enums\ActionsPosition;
use Filament\Tables\Table;

public function table(Table $table): Table
{
return $table
->actions([
// ...
], position: ActionsPosition::BeforeColumns);
}
use Filament\Tables\Enums\ActionsPosition;
use Filament\Tables\Table;

public function table(Table $table): Table
{
return $table
->actions([
// ...
], position: ActionsPosition::BeforeColumns);
}
joao nivaldo
joao nivaldoOP9mo ago
Okay, I saw this in the documentation, but since I'm using a Livewire component I use the getTableColumns method. Then, are you going to ask the Livewire component extending HasTable that I can use the TABLE method just like on the resource page? Is this on Filament v2?
joao nivaldo
joao nivaldoOP9mo ago
Hi, can anyone help me here please? ???
awcodes
awcodes9mo ago
Read the doc you posted. Position::beforeCells for v2 ActionsPosition::beforeCells for v3
joao nivaldo
joao nivaldoOP9mo ago
I've read it several times. As I said, if you use Position:beforeCells nothing happens. That's why I'm here asking if anyone knows what it could be.
awcodes
awcodes9mo ago
Ok, because the code you shared is using beforeColumns
joao nivaldo
joao nivaldoOP9mo ago
I'm sorry, I had tried all the options and ended up with this in the code.
awcodes
awcodes9mo ago
Can you share the Livewire component in a gist?
joao nivaldo
joao nivaldoOP9mo ago
The code is simple, can it be done here?
awcodes
awcodes9mo ago
I’m sure the whole resource won’t fit here.
awcodes
awcodes9mo ago
Hmm. Looks ok to me. What’s the view code?
awcodes
awcodes9mo ago
Hmm. All looks ok to me. Oh, duh. It’s not going to work with splits and stacks because those make it not a table anymore. There is no before cells since it’s not a table anymore.
joao nivaldo
joao nivaldoOP9mo ago
Wow, how evil. Is there any solution that can be done? I need it to stay this way. Do you have any suggestions?
awcodes
awcodes9mo ago
Yea, I’m sure it can be done, but that’s not going to be something supported out of the box, without creating custom columns specific to your layout needs. Wouldn’t call it evil either. Though. It’s either a table or it isn’t. But that’s at the html level and something Filament can’t necessarily overcome. We still have to be semantic and accessible.
joao nivaldo
joao nivaldoOP9mo ago
I really appreciate the help. I will transform it into custom columns . I think I'll end up with the same visual result. Thank you very much.
Want results from more Discord servers?
Add your server