diff --git a/index.js b/index.js index 5d6a2a8..4612624 100644 --- a/index.js +++ b/index.js @@ -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];