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
make this field ->live() and inject ?string $state or Get $get
jals65
jals652w ago
Where can I inject ?string $state ?
Solution
toeknee
toeknee2w ago
->live()
->suffixAction(fn($state) => dd($state))
->live()
->suffixAction(fn($state) => dd($state))
jals65
jals652w ago
But any way to get it on the suffixAction?
toeknee
toeknee2w ago
udpated I do this for currencey setting etc
jals65
jals652w ago
Thanks for that @toeknee @Leandro Ferreira