nice-elements 1.7.5 → 1.7.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nice-elements",
3
- "version": "1.7.5",
3
+ "version": "1.7.6",
4
4
  "description": "Nice elements used in olaii angular 1.x webapps.",
5
5
  "main": "dist/nice.js",
6
6
  "license": "MIT",
@@ -59,7 +59,6 @@ angular.module('niceElements')
59
59
  $scope.noMargin = $scope.noMargin === 'true' || $scope.noMargin === true;
60
60
  $scope.multiple = $scope.multiple === 'true' || $scope.multiple === true;
61
61
  $scope.clearOnSelect = $scope.clearOnSelect === 'true' || $scope.clearOnSelect === true;
62
- $scope.valid = $scope.formDropdown;
63
62
  $scope.isOpen = false;
64
63
  $scope.selected = null;
65
64
  $scope.selectedIndex = 0;
@@ -329,6 +328,11 @@ angular.module('niceElements')
329
328
  }
330
329
  }
331
330
  });
331
+
332
+ // Handle required
333
+ $timeout(function () {
334
+ $scope.formDropdown.$setValidity('required', !(!$scope.selected && $scope.required));
335
+ });
332
336
  }
333
337
 
334
338
  // ----------------------------------- Watch for keydown and keypress -----------------------------------