Occupy the entire width of the page

How could I make it fill the entire width of the page? I am in the profile. I have used "Customize authentication functions", so I have created a customizable file https://filamentphp.com/docs/3.x/panels/users#customizing-the-authentication-features
No description
Solution:
I have been able to solve it by simply changing: protected ?string $maxWidth = MaxWidth::SevenExtraLarge; to protected ?string $maxWidth = '7xl';...
Jump to solution
5 Replies
Tieme
Tieme6mo ago
set maxWidth
protected ?string $maxWidth = null;
protected ?string $maxWidth = null;
with one of the following Enums https://github.com/filamentphp/filament/blob/876fd30c3117e11cea4c370d3601006129e30113/packages/support/src/Enums/MaxWidth.php#L4 Something like this.
class EditProfile extends BaseEditProfile
{
protected ?string $maxWidth = MaxWidth::SevenExtraLarge;

public function form(Form $form): Form
{
return $form
->schema([
TextInput::make('username')
->required()
->maxLength(255),
$this->getNameFormComponent(),
$this->getEmailFormComponent(),
$this->getPasswordFormComponent(),
$this->getPasswordConfirmationFormComponent(),
]);
}
}
class EditProfile extends BaseEditProfile
{
protected ?string $maxWidth = MaxWidth::SevenExtraLarge;

public function form(Form $form): Form
{
return $form
->schema([
TextInput::make('username')
->required()
->maxLength(255),
$this->getNameFormComponent(),
$this->getEmailFormComponent(),
$this->getPasswordFormComponent(),
$this->getPasswordConfirmationFormComponent(),
]);
}
}
aacarrion4
aacarrion46mo ago
Sorry, what libraries should be used to make it work? I have the following error: Class "App "App\Filament\Pages\Auth\MaxWidth" not found
Tieme
Tieme6mo ago
add use Filament\Support\Enums\MaxWidth to the top of the page
aacarrion4
aacarrion46mo ago
Thanks! Hello @Tieme , sorry for the inconvenience, I have been following the steps you have told me, but I have the following error, do you know why it is? Cannot assign Filament\Support\Enums\MaxWidth to property App\Filament\Pages\Auth\EditProfile::$maxWidth of type ?string
Solution
aacarrion4
aacarrion46mo ago
I have been able to solve it by simply changing: protected ?string $maxWidth = MaxWidth::SevenExtraLarge; to protected ?string $maxWidth = '7xl';
Want results from more Discord servers?
Add your server
More Posts