Accessing $records in hintAction

I have a form field and would like to access the record I'm editing in a hint action...

Textarea::make()
  ->rows(3)
  ->hintAction(
      Forms\Components\Actions\Action::make('generate_title')
          ->icon('heroicon-o-arrow-path')
          ->action(function (?Role $record, Set $set) {
              ray($record);
...


Record is null here... what's the right way to access the record? Thanks!
Solution
Try fn ($livewire) => $livewire->getRecord()
Was this page helpful?