© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
6 replies
Asmit

Hint action disappear.

Forms\Components\Select::make('client_id')
    ->native(false)
    ->preload()
    ->live()
    ->relationship('client', 'title',
    ->required()
    ->afterStateUpdated(function (Forms\Components\Select $select, $state) {
            $select->hintAction(
                Forms\Components\Actions\Action::make('View Client Accoutnts')
                    ->action(function () {
                        info('View Rate Card');
                    })
            );
        }
    }),
Forms\Components\Select::make('client_id')
    ->native(false)
    ->preload()
    ->live()
    ->relationship('client', 'title',
    ->required()
    ->afterStateUpdated(function (Forms\Components\Select $select, $state) {
            $select->hintAction(
                Forms\Components\Actions\Action::make('View Client Accoutnts')
                    ->action(function () {
                        info('View Rate Card');
                    })
            );
        }
    }),

While I try to click on hint, it disappear.
Solution
Select::make('client_id')
    ->options([
        1 => 'Option 1',
        2 => 'Option 2',
    ])
    ->live()
    ->hintAction(action: fn ($state) => filled($state) ?
        Action::make('view_client')
            ->action(function () {
                //...
            }) : null)
Select::make('client_id')
    ->options([
        1 => 'Option 1',
        2 => 'Option 2',
    ])
    ->live()
    ->hintAction(action: fn ($state) => filled($state) ?
        Action::make('view_client')
            ->action(function () {
                //...
            }) : null)
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

hint action tests
FilamentFFilament / ❓┊help
3y ago
Hint Action in V4
FilamentFFilament / ❓┊help
2mo ago
Hint Action - Copy value
FilamentFFilament / ❓┊help
2y ago
$set on modal form hint action
FilamentFFilament / ❓┊help
13mo ago