© 2026 Hedgehog Software, LLC

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

Header action button not refreshing

I have a header action that has a conditional color() and action() it looks like this:

->color(fn () => $this->user->is_tracking ? Color::Orange : Color::Green)
->action(fn () => $this->user->is_tracking ? $this->user->stopTracking() : $this->user->startTracking())

The stopTracking() and startTracking() function toggle the $this->user->is_tracking variable

The problem is that for some reason, the button doesnt refresh (change color) the first time i press it.

It executes the action without problems, but the color doesnt change, i have to press it twice, then it changes to orange. its pretty weird, any help would be apreciated
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

Header action button click issue
FilamentFFilament / ❓┊help
3y ago
Header actions are not refreshing properly
FilamentFFilament / ❓┊help
2y ago
Adding Button/Action to Panel Header
FilamentFFilament / ❓┊help
3y ago
Refreshing custom page header widgets
FilamentFFilament / ❓┊help
3y ago