MCPcopy Create free account
hub / github.com/angular-ui/ui-grid / minChange

Function minChange

lib/test/angular/1.7.0/angular.js:26214–26233  ·  view source on GitHub ↗
(val)

Source from the content-addressed store, hash-verified

26212 }
26213
26214 function minChange(val) {
26215 minVal = parseNumberAttrVal(val);
26216 // ignore changes before model is initialized
26217 if (isNumberNaN(ctrl.$modelValue)) {
26218 return;
26219 }
26220
26221 if (supportsRange) {
26222 var elVal = element.val();
26223 // IE11 doesn't set the el val correctly if the minVal is greater than the element value
26224 if (minVal > elVal) {
26225 elVal = minVal;
26226 element.val(elVal);
26227 }
26228 ctrl.$setViewValue(elVal);
26229 } else {
26230 // TODO(matsko): implement validateLater to reduce number of validations
26231 ctrl.$validate();
26232 }
26233 }
26234
26235 function maxChange(val) {
26236 maxVal = parseNumberAttrVal(val);

Callers

nothing calls this directly

Calls 1

parseNumberAttrValFunction · 0.70

Tested by

no test coverage detected