I need help in finding a way to clear or dehydrate the 'name' Select Field whenever the LOB Select Field changes
Select::make('LOB')->label('LOB')
->options($departmentLabels)
->live(),
Select::make('name')->label('Name')->searchable()
->options(function (callable $get) use ($groupedUsers) {
$lob = $get('LOB');
return $groupedUsers($lob) ?? [];
}),
so far ive tried the method ->afterStateUpdated() but the problem there is any other field that changes also clears the name field and I can really use a conditional in the method to check if the old state != new state