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

Function maxChange

lib/test/angular/1.6.7/angular.js:25697–25717  ·  view source on GitHub ↗
(val)

Source from the content-addressed store, hash-verified

25695 }
25696
25697 function maxChange(val) {
25698 maxVal = parseNumberAttrVal(val);
25699 // ignore changes before model is initialized
25700 if (isNumberNaN(ctrl.$modelValue)) {
25701 return;
25702 }
25703
25704 if (supportsRange) {
25705 var elVal = element.val();
25706 // IE11 doesn't set the el val correctly if the maxVal is less than the element value
25707 if (maxVal < elVal) {
25708 element.val(maxVal);
25709 // IE11 and Chrome don't set the value to the minVal when max < min
25710 elVal = maxVal < minVal ? minVal : maxVal;
25711 }
25712 ctrl.$setViewValue(elVal);
25713 } else {
25714 // TODO(matsko): implement validateLater to reduce number of validations
25715 ctrl.$validate();
25716 }
25717 }
25718
25719 function stepChange(val) {
25720 stepVal = parseNumberAttrVal(val);

Callers

nothing calls this directly

Calls 1

parseNumberAttrValFunction · 0.70

Tested by

no test coverage detected