FilamentF
Filament9mo ago
Dom T.

I don't understand how I can refresh a field

I want to use a HintAction on a field and refresh another.
with a codebase like this :

`

Forms\Components\RichEditor::make('long_description')
    ->reactive()
    ->hintAction(
          Action::make('getAIDescription')
              ->label('Récupérer la description depuis AI')
              ->action(function (Product $record, EditProduct $livewire, Set $set) {
// I TRIED A LOT OF THING
                  $text = AIService::getDescription($record);
                  $set('ia_description',$text);
//                return $livewire->dispatch('refreshPage');
              })
     )
     ->label('Description longue'),

RichEditor::make('ia_description')
    ->label('Description IA'),
Was this page helpful?