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.
30 lines • 1.19 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 FocusKeyManager = (function (_super) {
__extends(FocusKeyManager, _super);
function FocusKeyManager(items) {
return _super.call(this, items) || this;
}
/**
* This method sets the active item to the item at the specified index.
* It also adds focuses the newly active item.
*/
FocusKeyManager.prototype.setActiveItem = function (index) {
_super.prototype.setActiveItem.call(this, index);
if (this.activeItem) {
this.activeItem.focus();
}
};
return FocusKeyManager;
}(ListKeyManager));
export { FocusKeyManager };
//# sourceMappingURL=focus-key-manager.js.map