Use a function (): Action from a Resource ?

Hi, im trying to launch an Action from a function in a resource component but im not getting any response... Any ideas? This is the code i have so far:
public function saveSelectedText(): \Filament\Forms\Components\Actions\Action
    {
        return Action::make('save')->label('Save')->action(function () {
            dd($this->selectedText);
        });
    }
Was this page helpful?