DEV Community

Horacio Degiorgi
Horacio Degiorgi

Posted on

1

Mejoras en los formularios

Probador de enlaces para cambios URL

Image description

Filamentphp permite agregar contenido delante o detrás de los inputs en forma sencilla

use Filament\Forms\Components\Actions\Action as ActionComp;

... 
    Forms\Components\TextInput::make('url')
                    ->required()
                    ->suffixAction(fn (?string $state): ActionComp =>
                ActionComp::make('visitar')
                    ->icon('heroicon-s-external-link')
                    ->url(
                        filled($state) ? "$state" : null,
                        shouldOpenInNewTab: true,
                    ),
Enter fullscreen mode Exit fullscreen mode

Lo único importante es declarar al inicio del script el uso de ActionComp

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs