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

Function setOptionSelectedStatus

lib/test/angular/1.6.7/angular.js:32751–32761  ·  view source on GitHub ↗
(optionEl, value)

Source from the content-addressed store, hash-verified

32749var noopNgModelController = { $setViewValue: noop, $render: noop };
32750
32751function setOptionSelectedStatus(optionEl, value) {
32752 optionEl.prop('selected', value);
32753 /**
32754 * When unselecting an option, setting the property to null / false should be enough
32755 * However, screenreaders might react to the selected attribute instead, see
32756 * https://github.com/angular/angular.js/issues/14419
32757 * Note: "selected" is a boolean attr and will be removed when the "value" arg in attr() is false
32758 * or null
32759 */
32760 optionEl.attr('selected', value);
32761}
32762
32763/**
32764 * @ngdoc type

Callers 2

angular.jsFile · 0.70
selectPreLinkFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected