(groupId: UniqueId, tabId: UniqueId)
| 586 | } |
| 587 | |
| 588 | public setActive(groupId: UniqueId, tabId: UniqueId) { |
| 589 | const { groups = [] } = this.state; |
| 590 | const groupIndex = this.getGroupIndexById(groupId); |
| 591 | |
| 592 | if (groupIndex > -1) { |
| 593 | const nextGroups = [...groups]; |
| 594 | const group = nextGroups[groupIndex]; |
| 595 | const tab = this.getTabById(tabId, group.id!); |
| 596 | |
| 597 | if (tab) { |
| 598 | const nextGroup = { ...group }; |
| 599 | nextGroup.tab = { ...tab }; |
| 600 | nextGroup.activeTab = tabId; |
| 601 | nextGroups[groupIndex] = nextGroup; |
| 602 | |
| 603 | this.setState({ |
| 604 | current: nextGroup, |
| 605 | groups: nextGroups, |
| 606 | }); |
| 607 | } |
| 608 | } |
| 609 | } |
| 610 | |
| 611 | public updateGroup( |
| 612 | groupId: UniqueId, |
no test coverage detected