F
Filament5mo ago
jals65

TextInput with follow action

Hi, I'm traying to build a text input with a suffixAction that follows the url typed on the input.
\Filament\Forms\Components\TextInput::make('test')->url()->suffixAction(
Action::make('follow-url')
->icon('heroicon-m-globe-alt')
->url(function ($data) {
return $data->url();
})
->openUrlInNewTab()
)
\Filament\Forms\Components\TextInput::make('test')->url()->suffixAction(
Action::make('follow-url')
->icon('heroicon-m-globe-alt')
->url(function ($data) {
return $data->url();
})
->openUrlInNewTab()
)
How can I get the value typed on the text input?
Solution:
->live()
->suffixAction(fn($state) => dd($state))
->live()
->suffixAction(fn($state) => dd($state))
...
Jump to solution
6 Replies
LeandroFerreira
LeandroFerreira5mo ago
make this field ->live() and inject ?string $state or Get $get
jals65
jals65OP5mo ago
Where can I inject ?string $state ?
Solution
toeknee
toeknee5mo ago
->live()
->suffixAction(fn($state) => dd($state))
->live()
->suffixAction(fn($state) => dd($state))
jals65
jals65OP5mo ago
But any way to get it on the suffixAction?
toeknee
toeknee5mo ago
udpated I do this for currencey setting etc
jals65
jals65OP5mo ago
Thanks for that @toeknee @Leandro Ferreira
Want results from more Discord servers?
Add your server