Custom Table Layout

how can i get the enable column in the middle of the both first column and the manage button
No description
17 Replies
alexanderkroneis
alexanderkroneis15mo ago
Could you specify? I see 3 columns: Payment Gateway, Enable and the action column. Where do you wanna put the Enable column?
Hugo
Hugo15mo ago
I think he wants the enable column to be centered.
AliBabba420
AliBabba420OP15mo ago
yes
alexanderkroneis
alexanderkroneis15mo ago
Ah, you could try columnSpan()
Tables\Columns\TextColumn::make('name')
->label(__('Name'))
->searchable()
->columnSpan(2),
Tables\Columns\TextColumn::make('name')
->label(__('Name'))
->searchable()
->columnSpan(2),
AliBabba420
AliBabba420OP15mo ago
ok bro
alexanderkroneis
alexanderkroneis15mo ago
or alignCenter I never used both of them, but they might help
AliBabba420
AliBabba420OP15mo ago
in the enable column
Hugo
Hugo15mo ago
doesn't exist on v2
AliBabba420
AliBabba420OP15mo ago
bro it doesn't work like late me explain the table take only two column one payment gateway and another one is enable and the third one it is action button i edit that like an button so i wnat all of them should be centered like the enable column should appear in middle of the paymentgateway and manage button
alexanderkroneis
alexanderkroneis15mo ago
Are you using v2 or v3?
AliBabba420
AliBabba420OP15mo ago
v2 bro bro i override the css of that table and change the width according to my requirement i know it is not a right way but that's how i get my requirement
alexanderkroneis
alexanderkroneis15mo ago
sorry, can't help with v2 :/ and docs don't help me helping u maybe one of the core team can help you with that. let's wait a little longer.
toeknee
toeknee15mo ago
So you can use ->alignCenter() or ->extraAttributes(['class' => 'my-width-class'])
AliBabba420
AliBabba420OP15mo ago
and one more thing the enable table header and the toogle button also not align ?
toeknee
toeknee15mo ago
Need a screenshot to understand what you mean
AliBabba420
AliBabba420OP15mo ago
Already posted I want the toggle button column should be in middle of first column and the manage button
awcodes
awcodes15mo ago
The only way to do this would be by setting explicit widths on your table columns with css. That’s just how tables work in html. It has nothing to do with Filament.
Want results from more Discord servers?
Add your server