[Containment] Set validity in locator
Set validity of selected location from locator control, to disallow creation when no valid location is selected (which is possible due to containment rules.) WTD-962.
This commit is contained in:
@@ -34,8 +34,17 @@ define(
|
||||
$scope.structure.validate(priorObject) ?
|
||||
priorObject : undefined
|
||||
);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Set validity
|
||||
if ($scope.ngModelController) {
|
||||
$scope.ngModelController.$setValidity(
|
||||
'composition',
|
||||
!!$scope.treeModel.selectedObject
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Initial state for the tree's model
|
||||
|
||||
Reference in New Issue
Block a user