Fix: No live preview for fonts (#1921)

This commit is contained in:
hallo123wert 2025-11-24 00:06:08 +01:00 committed by GitHub
parent 07763d912b
commit 25c8ff3f1f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -37,7 +37,6 @@ use Filament\Schemas\Components\Section;
use Filament\Schemas\Components\Tabs; use Filament\Schemas\Components\Tabs;
use Filament\Schemas\Components\Tabs\Tab; use Filament\Schemas\Components\Tabs\Tab;
use Filament\Schemas\Components\Utilities\Get; use Filament\Schemas\Components\Utilities\Get;
use Filament\Schemas\Components\Utilities\Set;
use Filament\Schemas\Schema; use Filament\Schemas\Schema;
use Filament\Support\Colors\Color; use Filament\Support\Colors\Color;
use Filament\Support\Enums\Width; use Filament\Support\Enums\Width;
@ -455,6 +454,7 @@ class EditProfile extends BaseEditProfile
->minValue(1) ->minValue(1)
->numeric() ->numeric()
->required() ->required()
->live()
->default(14), ->default(14),
Select::make('console_font') Select::make('console_font')
->label(trans('profile.font')) ->label(trans('profile.font'))
@ -479,9 +479,8 @@ class EditProfile extends BaseEditProfile
return $fonts; return $fonts;
}) })
->reactive() ->live()
->default('monospace') ->default('monospace'),
->afterStateUpdated(fn ($state, Set $set) => $set('font_preview', $state)),
TextEntry::make('font_preview') TextEntry::make('font_preview')
->label(trans('profile.font_preview')) ->label(trans('profile.font_preview'))
->columnSpan(2) ->columnSpan(2)