F
Filamentβ€’15mo ago
StanProg

Is it possible to set a hint to other component from afterStateUpdated closure?

I have a afterStateUpdated closure on ComponentA that sets the value of the ComponentB. I would like additionally to set the hint of ComponentB.
4 Replies
Dennis Koch
Dennis Kochβ€’15mo ago
You cannot set a hint. But you can use a closure on ->hint() and show a hint based on the state.
StanProg
StanProgβ€’15mo ago
Sample code:
->hint(fn (callable $get): string => 'sample hint for component value ' . $get)
->hint(fn (callable $get): string => 'sample hint for component value ' . $get)
Dan Harrin
Dan Harrinβ€’15mo ago
yes
Dennis Koch
Dennis Kochβ€’15mo ago
Is there a question? πŸ˜