Infolist columns doesn't works

when i use this inbside the resource :
public static function infolist(Infolist $infolist): Infolist
{
return $infolist
->schema([
Infolists\Components\Section::make('1')
->schema([
// ...
]),
Infolists\Components\Section::make('2')
->schema([
// ...
]),
Infolists\Components\Section::make('3')
->schema([
// ...
]),
])
->columns(3);
}
public static function infolist(Infolist $infolist): Infolist
{
return $infolist
->schema([
Infolists\Components\Section::make('1')
->schema([
// ...
]),
Infolists\Components\Section::make('2')
->schema([
// ...
]),
Infolists\Components\Section::make('3')
->schema([
// ...
]),
])
->columns(3);
}
it's not apply.
13 Replies
ConnorHowell
ConnorHowell14mo ago
When you say “resource” I’m assuming this is in an admin panel? Do you actually have a view page setup for the resource? If your resource is User, do you have a ViewUser class setup under pages for that resource? And is that correctly registered in the getPages method?
Gregory RODRIGUES
Gregory RODRIGUESOP14mo ago
yes inside admin panel :
->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources')
->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources')
inside the provider generate the resource with the cli
ConnorHowell
ConnorHowell14mo ago
What does the getPages method look like in your resource?
Gregory RODRIGUES
Gregory RODRIGUESOP14mo ago
No description
Gregory RODRIGUES
Gregory RODRIGUESOP14mo ago
i find the problem it's the render style and class but i don't know if the bug of the function i use not custom render columns 3 inside master div it's ok the probleme it's the section use col-span-default
Dan Harrin
Dan Harrin14mo ago
we dont even know what the problem is you have not explained what is happening
ConnorHowell
ConnorHowell14mo ago
Yeah I’m real confused to be honest, so you have got a view page for your resource? And on that view page all you have setup is 3 empty sections? With nothing else? And the page looks like…..?
Gregory RODRIGUES
Gregory RODRIGUESOP14mo ago
beacuse it's a test 😉 i find the solution ->columnSpan(1) beacause by default it's full but it's very strange, the render generate -1 it's not good
ConnorHowell
ConnorHowell14mo ago
Feel like we would have figured that out much sooner had we been given more info but glad you got it sorted 👍
Gregory RODRIGUES
Gregory RODRIGUESOP14mo ago
No description
Gregory RODRIGUES
Gregory RODRIGUESOP14mo ago
inside of the render component column.blade.php of the vendor it's strange default render
Dan Harrin
Dan Harrin14mo ago
you havent even sent a screenshot of what it looks like
Gregory RODRIGUES
Gregory RODRIGUESOP14mo ago
public static function infolist(Infolist $infolist): Infolist
{
return $infolist
->schema([
Infolists\Components\Section::make('Profile')
->schema([
// ...
])->columnSpan(1),
Infolists\Components\Section::make('Ruby')
->schema([
// ...
])->columnSpan(1),
Infolists\Components\Section::make('Score')
->schema([
// ...
])->columnSpan(1),
])
->columns(['lg' => 3]);
}
public static function infolist(Infolist $infolist): Infolist
{
return $infolist
->schema([
Infolists\Components\Section::make('Profile')
->schema([
// ...
])->columnSpan(1),
Infolists\Components\Section::make('Ruby')
->schema([
// ...
])->columnSpan(1),
Infolists\Components\Section::make('Score')
->schema([
// ...
])->columnSpan(1),
])
->columns(['lg' => 3]);
}
if i don't apply the columnSpan(1), the render it's --col-span-default: 1 / -1 and override the columns 3 for passe to full you understand, sorry for my english
Want results from more Discord servers?
Add your server