© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
7 replies
lupoz

live method trim himself

When I compile name field, slug and title are update, but the last two chars of name are trimmed:

TextInput::make('name')
    ->columnSpan(10)
    ->required()
    ->placeholder('Love')
    ->live()
    ->afterStateUpdated(fn ($state, callable $set) => [
        $set('title', 'Books about ' . $state),
        $set('slug', Str::slug('Books about ' . $state))
    ]),
TextInput::make('name')
    ->columnSpan(10)
    ->required()
    ->placeholder('Love')
    ->live()
    ->afterStateUpdated(fn ($state, callable $set) => [
        $set('title', 'Books about ' . $state),
        $set('slug', Str::slug('Books about ' . $state))
    ]),
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

live method is rendering mine table
FilamentFFilament / ❓┊help
2y ago
Live method is calling mine action
FilamentFFilament / ❓┊help
2y ago
Trim Text Inputs
FilamentFFilament / ❓┊help
10mo ago
Trim each input
FilamentFFilament / ❓┊help
3y ago