Refresh form after calling model function

maybe a stupid question, but I am scratching my head for a couple of days now.
I am using the default admin panel setup. When I in the form update the Status field, it will call a function in the model (setStatus in this case), this updates different fields in the model as well (with some more logic). Some of those fields are also visible in the form.

The problem now is that the other fields in the form are not updated with this call. How do I get those reloaded. If I put the logic of the model in the form with $set statements it works, but this is from maintenance point of view cumbersome). Is there a simple "->reload()" function I am overlooking.

Select::make('Status')
    ->options([
        'Ingevoerd' => 'Ingevoerd',
        'Aangeboden' => 'Aangeboden',
        'Ontvangen' => 'Ontvangen',
        'Afgehandeld' => 'Afgehandeld',
    ])->reactive()
    ->afterStateUpdated(function (Clothing $record, callable $get) {
        $record->setStatus($get('Status'));
        $record->save();
    })
    
Was this page helpful?