afterStateHydrated not working when using multiple Fieldset

i'm trying to use afterStateHydrated on FieldA in Fieldset1 to update FieldB in Fieldset2, this does not work. When doing the same when FieldA and FieldB are in the same Fieldset1, then it works fine.
Solution
Select::make('account_deal_id')
...
    ->live()
    ->afterStateUpdated(
        function ($state, Set $set, Get $get) {
            dd(
                $get('deal_info'), null
                $get('accountDeal'), related record OK
                $get('accountDeal.id'), account_id OK
                $get('accountDeal.status'), status OK

            );
        }
    )
...

Fieldset::make('deal_info')
    ->relationship('accountDeal')
    ->schema([
        Select::make('id')
            ->relationship('account')
            ...

        Select::make('status')
            ...
    ]),
Was this page helpful?