Skip to content
This repository has been archived by the owner on Sep 8, 2020. It is now read-only.

fix updating valid and dirty statuses #314

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/select2.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ angular.module('ui.select2', []).value('uiSelect2Config', {}).directive('uiSelec
}

// Update valid and dirty statuses
controller.$parsers.push(function (value) {
controller.$viewChangeListeners.push(function () {
var div = elm.prev();
div
.toggleClass('ng-invalid', !controller.$valid)
Expand All @@ -157,7 +157,6 @@ angular.module('ui.select2', []).value('uiSelect2Config', {}).directive('uiSelec
.toggleClass('ng-valid-required', controller.$valid)
.toggleClass('ng-dirty', controller.$dirty)
.toggleClass('ng-pristine', controller.$pristine);
return value;
});

if (!isSelect) {
Expand Down