Answer Overflow Logo
Change Theme
Search Answer Overflow
GitHub
Add Your Server
Login
Home
Popular
Topics
Gaming
Programming
Bestun
Posts
Comments
F
Filament
•
Created by Veur on 3/8/2023 in
#❓┊help
Determine Toggle label by state
You should not forget to use the $state and the reactive() method in order to be changing after state update.
18 replies
F
Filament
•
Created by Veur on 3/8/2023 in
#❓┊help
Determine Toggle label by state
toggle::make(is_visible)->label('Visibility)->helperText(fn ($state): string => $state? 'Visible' : 'Hidden')->reactive(),
18 replies
F
Filament
•
Created by Veur on 3/8/2023 in
#❓┊help
Determine Toggle label by state
I was searching for how to change helperText() return string based on the states of the toggle. It accepts a closure; so the way worked for me was:
18 replies