© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
41 replies
neverender24

TextInput afterStateUpdated() reactive weird behavior

I have copied a well-functional code from my V2 app. But I have this weird behavior in V3 The text goes back and forth. The code works really well in V2. I have tested it also in a freshly installed Laravel and Filament V3.

 public static function form(Form $form): Form
    {
        return $form
            ->schema([
                Forms\Components\TextInput::make('name')->reactive()
                ->afterStateUpdated(function ($set, $state) {
                    $set('slug', Str::slug($state));
                }),
                Forms\Components\TextInput::make('slug')->required()->disabled(),
            ]);
    }
 public static function form(Form $form): Form
    {
        return $form
            ->schema([
                Forms\Components\TextInput::make('name')->reactive()
                ->afterStateUpdated(function ($set, $state) {
                    $set('slug', Str::slug($state));
                }),
                Forms\Components\TextInput::make('slug')->required()->disabled(),
            ]);
    }
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

afterStateUpdated() not triggering on TextInput
FilamentFFilament / ❓┊help
3y ago
Reactive field and afterStateUpdated is not update in realtime on Forms\Components\TextInput\Mask
FilamentFFilament / ❓┊help
3y ago
Update TextInput programmatically in reactive way
FilamentFFilament / ❓┊help
3y ago
Weird override behavior
FilamentFFilament / ❓┊help
17mo ago