
disabled function in my select "model" can't be selected when disabled set to false

public static function form(Form $form): Form
{
return $form
->schema([
Forms\Components\Select::make('car_brand_id')
->reactive()
->relationship('brand', 'name')
->searchable()
->options(Brand::limit(10)->pluck('name', 'id'))
->required()
->afterStateUpdated(fn ($set) => $set('car_model_id', null)),
Forms\Components\Select::make('car_model_id')
->searchable()
->reactive()
->disabled(function (callable $get) {
if (!$get('car_brand_id')) {
return true;
} else {
return false;
};
})
->required()
->options(function (callable $get) {
$brand = Brand::find($get('car_brand_id'));
if (!$brand) {
return CarModel::limit(10)->pluck('name', 'id');
}
return $brand->models->pluck('name', 'id');
}),
Forms\Components\TextInput::make('name')
->required()
->unique(Type::class, 'name')
->columnSpan(2),
])->columns(2);
}->disabled(fn(callable $get) => empty($get('car_brand_id')))->visible(fn(callable $get) => !empty($get('car_brand_id')))->columnSpan(fn(callable $get) => !empty($get('car_brand_id')) ? 1 : 2)