Set default value to a select, listening the change from another input
I am trying to assign a default value to the select, which would be true when having a data and false when not having it, but it does not detect the change of the input date
Forms\Components\DatePicker::make('extinguisher_expiration')->live(debounce: 500),
Forms\Components\Select::make('extinguisher_status')
->options([
'true' => 'true',
'false' => 'false',
])
->default(function(Get $get){
if(!is_null($get('extinguisher_expiration'))){
return 'true';
}
return 'false';
}),