F
Filament17mo ago
Oddman

Why is my tab only 50% width with no column config?

return $form->schema([
Tabs::make('Label')
->tabs([
Tabs\Tab::make('Details')
->schema(([
Components\Section::make('Details')->schema([
Components\TextInput::make('title')->autofocus(),
Components\Textarea::make('excerpt'),
Components\FileUpload::make('hero_image')->image()->imageEditor()
]),
Components\Section::make('Options')
->icon('heroicon-s-cog-6-tooth')
->schema([
Components\Toggle::make('published'),
Components\DateTimePicker::make('published_at'),
Components\Select::make('layout')->options([
'default' => 'Default',
'featured' => 'Featured',
])->default('default'),
Components\Toggle::make('early_access'),
Components\Toggle::make('pro_series'),
])
]))
])
]);
return $form->schema([
Tabs::make('Label')
->tabs([
Tabs\Tab::make('Details')
->schema(([
Components\Section::make('Details')->schema([
Components\TextInput::make('title')->autofocus(),
Components\Textarea::make('excerpt'),
Components\FileUpload::make('hero_image')->image()->imageEditor()
]),
Components\Section::make('Options')
->icon('heroicon-s-cog-6-tooth')
->schema([
Components\Toggle::make('published'),
Components\DateTimePicker::make('published_at'),
Components\Select::make('layout')->options([
'default' => 'Default',
'featured' => 'Featured',
])->default('default'),
Components\Toggle::make('early_access'),
Components\Toggle::make('pro_series'),
])
]))
])
]);
My only tab, is taking up just 50% of the width, and I can't work out why.
Solution:
Got it, had to set the form columns to 1.
Jump to solution
3 Replies
Solution
Oddman
Oddman17mo ago
Got it, had to set the form columns to 1.
awcodes
awcodes17mo ago
Or set the tabs component with ->columSpanFull() or ->columnSpan(‘full’) By default forms have 2 columns.
Oddman
OddmanOP17mo ago
Cheers 🙂
Want results from more Discord servers?
Add your server