md2
Version:
Angular2 based Material Design components, directives and services are Accordion, Autocomplete, Chips(Tags), Collapse, Colorpicker, Data Table, Datepicker, Dialog(Modal), Menu, Multiselect, Select, Tabs, Tags(Chips), Toast and Tooltip.
37 lines • 1.58 kB
JavaScript
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
import { ListKeyManager } from './list-key-manager';
var ActiveDescendantKeyManager = (function (_super) {
__extends(ActiveDescendantKeyManager, _super);
function ActiveDescendantKeyManager() {
return _super !== null && _super.apply(this, arguments) || this;
}
/**
* This method sets the active item to the item at the specified index.
* It also adds active styles to the newly active item and removes active
* styles from the previously active item.
*/
ActiveDescendantKeyManager.prototype.setActiveItem = function (index) {
var _this = this;
Promise.resolve().then(function () {
if (_this.activeItem) {
_this.activeItem.setInactiveStyles();
}
_super.prototype.setActiveItem.call(_this, index);
if (_this.activeItem) {
_this.activeItem.setActiveStyles();
}
});
};
return ActiveDescendantKeyManager;
}(ListKeyManager));
export { ActiveDescendantKeyManager };
//# sourceMappingURL=activedescendant-key-manager.js.map