Advanced - Form Builder

Could you please help me understand why selecting a company name in my app results in a blank page when I use the reactive() and afterStateUpdated() methods? Your insights would be greatly appreciated. There is no error in my browser console.

Forms\Components\Select::make('company_id')
    ->options(\App\Models\Company::all()->pluck('name', 'id'))
    ->searchable()
    ->reactive()
    ->afterStateUpdated(fn (callable $set) => $set('location_id', null))

Forms\Components\Select::make('location_id')
    ->label('Location')
    ->options(function (callable $get) {
        $company = \App\Models\Company::find($get('company_id'));
        if (! $company) {
            return \App\Models\Location::all()->pluck('name', 'id');
        }

        return $company->locations->pluck('name', 'id');
    })
    ->string()
    ->searchable()
    ->required(),

I noticed that this occurred after upgrading to Filament v3 on a different branch.
Was this page helpful?