F
Filament13mo ago
Veur

Show different widgets in 1 row

Hi, in the header of a View page I would like to display 3 widgets: 1 'normal' widget and 2 Stat widgets (see screenshot). Is there a way to display them next to each other, in 1 row? This is the getHeaderWidgets() method currently:
public function getHeaderWidgets(): array
{
return [
NormalWidget::class,
StatsWidgets::class,
];
}
public function getHeaderWidgets(): array
{
return [
NormalWidget::class,
StatsWidgets::class,
];
}
No description
Solution:
try edit the columnSpan property of the widget for example ``` // ViewResource.php public function getHeaderWidgetsColumns(): int|string|array...
No description
Jump to solution
4 Replies
lodeki
lodeki13mo ago
Probably assign them the same $sort value
protected static ?int $sort = 1
protected static ?int $sort = 1
Veur
VeurOP13mo ago
That didn't change anything unfortunately
Solution
awsqed
awsqed13mo ago
try edit the columnSpan property of the widget for example
// ViewResource.php
public function getHeaderWidgetsColumns(): int|string|array
{
return 3;
}
// ViewResource.php
public function getHeaderWidgetsColumns(): int|string|array
{
return 3;
}
// NormalWidget.php
protected int | string | array $columnSpan = 1;
// NormalWidget.php
protected int | string | array $columnSpan = 1;
// StatsWidgets.php
protected int | string | array $columnSpan = 2;

protected function getColumns(): int
{
return 2;
}
// StatsWidgets.php
protected int | string | array $columnSpan = 2;

protected function getColumns(): int
{
return 2;
}
No description
Veur
VeurOP13mo ago
Thanks @awsqed !
Want results from more Discord servers?
Add your server