© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
1 reply
Jon Mason

mask with afterStateUpdated immediately submits form

Why does using the
mask()
mask()
method as well as the
afterStateUpdated
afterStateUpdated
method on a
TextInput
TextInput
make the form immediately submit?

 TextInput::make('total')
                    ->mask('999999')
                    ->afterStateUpdated(function (?string $state, ?string $old) {
                        Log::debug($state);
                      
                    }),
 TextInput::make('total')
                    ->mask('999999')
                    ->afterStateUpdated(function (?string $state, ?string $old) {
                        Log::debug($state);
                      
                    }),


Using either one by itself works as expected.
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

mask method triggers afterStateUpdated() method on page load
FilamentFFilament / ❓┊help
17mo ago
Form with fields that have ->reactive and afterStateUpdated
FilamentFFilament / ❓┊help
5mo ago
mask removed on form submit
FilamentFFilament / ❓┊help
3y ago
Close modal inside afterStateUpdated in form
FilamentFFilament / ❓┊help
14mo ago