Add tabGroup.getTab() method

This commit is contained in:
Thomas Brouard 2016-11-01 14:43:42 +01:00
parent d17be60941
commit d6588fd2e7

View file

@ -63,6 +63,15 @@ class TabGroup extends EventEmitter {
return tab;
}
getTab (id) {
for (let i in this.tabs) {
if (this.tabs[i].id === id) {
return this.tabs[i];
}
}
return null;
}
getActiveTab () {
if (this.tabs.length === 0) return null;
return this.tabs[0];