Skip to content

Commit

Permalink
Merge pull request #2899 from villian/temp-U4-8143
Browse files Browse the repository at this point in the history
U4-8143 - MNTP (content picker) does not set $dirty
  • Loading branch information
nul800sebastiaan authored Sep 25, 2018
2 parents d2d77d2 + 1437af6 commit 524f53d
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ function contentPickerController($scope, entityResource, editorState, iconHelper
return $scope.model.config.idType === "udi" ? i.udi : i.id;
});
$scope.model.value = trim(currIds.join(), ",");
angularHelper.getCurrentForm($scope).$setDirty();

//Validate!
if ($scope.model.config && $scope.model.config.minNumber && parseInt($scope.model.config.minNumber) > $scope.renderModel.length) {
Expand Down Expand Up @@ -185,7 +186,8 @@ function contentPickerController($scope, entityResource, editorState, iconHelper
if (angular.isArray(model.selection)) {
_.each(model.selection, function (item, i) {
$scope.add(item);
});
});
angularHelper.getCurrentForm($scope).$setDirty();
}

$scope.contentPickerOverlay.show = false;
Expand Down

0 comments on commit 524f53d

Please sign in to comment.