InfoList max width
How can I make my InfoList, which I'm defining in my ModelResource, take the screen whole width, as in MaxWidth::Full ?
public static function infolist(Infolist $infolist): Infolist
{
return $infolist
->schema([
TextEntry::make('host.name'),
TextEntry::make('event_type.name'),
TextEntry::make('timestamp'),
KeyValueEntry::make('data')
->label('Details')
->keyLabel('Key')
->valueLabel('Value')
->extraAttributes(['style' => 'word-wrap: anywhere'])
->getStateUsing(function (Event $record): array {
$details = [];
foreach ($record->data as $key => $value) {
if (is_array($value)) {
foreach ($value as $k => $v) {
$details[$k] = match (true) {
is_array($v) => json_encode($v),
default => $v,
};
}
}
}
ksort($details);
return $details;
}),
])
->columns(1)
->inlineLabel();
} public static function infolist(Infolist $infolist): Infolist
{
return $infolist
->schema([
TextEntry::make('host.name'),
TextEntry::make('event_type.name'),
TextEntry::make('timestamp'),
KeyValueEntry::make('data')
->label('Details')
->keyLabel('Key')
->valueLabel('Value')
->extraAttributes(['style' => 'word-wrap: anywhere'])
->getStateUsing(function (Event $record): array {
$details = [];
foreach ($record->data as $key => $value) {
if (is_array($value)) {
foreach ($value as $k => $v) {
$details[$k] = match (true) {
is_array($v) => json_encode($v),
default => $v,
};
}
}
}
ksort($details);
return $details;
}),
])
->columns(1)
->inlineLabel();
}Solution
oh i see
idk maybe try
idk maybe try
->modalWidth(MaxWidth::SevenExtraLarge) or ->modalWidth(MaxWidth::Full) ->modalWidth(MaxWidth::SevenExtraLarge) or ->modalWidth(MaxWidth::Full)