How to get table grid to align?

Hi, I've got the following code using the table grid, but the column tables don't line up. Any ideas on why? It's to do with the width of the actions, but I thought the grid was supposed to ensure everything aligned?
public static function table(Table $table) : Table
{
return $table
->recordUrl(null)
->defaultGroup('project.name')
->columns([
Grid::make([
'lg' => 5,
])->schema([
TextColumn::make("created_at")->color('gray'),
TextColumn::make("name")
->extraAttributes([ 'class' => 'font-bold' ]),
TextColumn::make("description"),
TextColumn::make("activity.url")
->label("URL")
->url(fn (Task $task) => $task->activity->url ?? null)
->openUrlInNewTab(true),

])
])
->actions([
Action::make('complete')
->label('Mark as Complete')
->icon('heroicon-s-check-circle')
->action(fn (Task $task) => $task->delete())
->visible(fn (Task $task) => ! $task->deleted_at)
,
Action::make('reopen')
->label('Re-Open')
->icon('heroicon-o-arrow-path')
->action(fn (Task $task) => $task->restore())
->visible(fn (Task $task) => $task->deleted_at),
])
->modifyQueryUsing(fn (Builder $query) => $query->with('activity')->with('project')->withTrashed()->orderBy('deleted_at', 'asc'));
}
public static function table(Table $table) : Table
{
return $table
->recordUrl(null)
->defaultGroup('project.name')
->columns([
Grid::make([
'lg' => 5,
])->schema([
TextColumn::make("created_at")->color('gray'),
TextColumn::make("name")
->extraAttributes([ 'class' => 'font-bold' ]),
TextColumn::make("description"),
TextColumn::make("activity.url")
->label("URL")
->url(fn (Task $task) => $task->activity->url ?? null)
->openUrlInNewTab(true),

])
])
->actions([
Action::make('complete')
->label('Mark as Complete')
->icon('heroicon-s-check-circle')
->action(fn (Task $task) => $task->delete())
->visible(fn (Task $task) => ! $task->deleted_at)
,
Action::make('reopen')
->label('Re-Open')
->icon('heroicon-o-arrow-path')
->action(fn (Task $task) => $task->restore())
->visible(fn (Task $task) => $task->deleted_at),
])
->modifyQueryUsing(fn (Builder $query) => $query->with('activity')->with('project')->withTrashed()->orderBy('deleted_at', 'asc'));
}
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server