F
Filament6mo ago
Ahmad

infoList basic Grid 3 columns only see the 3 column

public static function infolist(Infolist $infolist): Infolist
{
return $infolist
->schema([
Grid::make(3)
->columnStart(1)
->schema([
Section::make('Algemeen')
->columns(1)
->schema([
TextEntry::make('Bedrijf_user'),
]),
])
->columnStart(2)
->schema([
Section::make('Contactpersonen')
->columns(1)
->schema([
TextEntry::make('Phone'),
]),
])
->columnStart(3)
->schema([
RepeatableEntry::make('inlogGegevens')
->columns(1)
->schema([
TextEntry::make('InlogNaam')
->copyable()
->copyMessage('Copied!'),
TextEntry::make('UserName')
->copyable()
->copyMessage('Copied!'),
TextEntry::make('Password') // Corrected field reference
->copyable()
->copyMessage('Copied!'),
])

]),
]);
}
public static function infolist(Infolist $infolist): Infolist
{
return $infolist
->schema([
Grid::make(3)
->columnStart(1)
->schema([
Section::make('Algemeen')
->columns(1)
->schema([
TextEntry::make('Bedrijf_user'),
]),
])
->columnStart(2)
->schema([
Section::make('Contactpersonen')
->columns(1)
->schema([
TextEntry::make('Phone'),
]),
])
->columnStart(3)
->schema([
RepeatableEntry::make('inlogGegevens')
->columns(1)
->schema([
TextEntry::make('InlogNaam')
->copyable()
->copyMessage('Copied!'),
TextEntry::make('UserName')
->copyable()
->copyMessage('Copied!'),
TextEntry::make('Password') // Corrected field reference
->copyable()
->copyMessage('Copied!'),
])

]),
]);
}
i mad Grid that have 3 columns but i think he is only reading the last schema that is the 3 one is there another way to make it
No description
1 Reply
DrByte
DrByte6mo ago
Looks like it's just obeying the last columnStart(3) command you gave it. The ones before it got overridden by the last one
->schema([
Grid::make(3)
->columnStart(1)
->schema([
])
->columnStart(2)
->schema([
])
->columnStart(3)
->schema([
]),
]);
->schema([
Grid::make(3)
->columnStart(1)
->schema([
])
->columnStart(2)
->schema([
])
->columnStart(3)
->schema([
]),
]);
Seems like your overall syntax is incorrect. https://filamentphp.com/docs/3.x/infolists/layout/grid#grid-component