(
groupId: UniqueId,
groupValues: Omit<IEditorGroup, 'id'>
)
| 609 | } |
| 610 | |
| 611 | public updateGroup( |
| 612 | groupId: UniqueId, |
| 613 | groupValues: Omit<IEditorGroup, 'id'> |
| 614 | ) { |
| 615 | const { groups = [] } = this.state; |
| 616 | const nextGroups = [...groups]; |
| 617 | const groupIndex = this.getGroupIndexById(groupId); |
| 618 | |
| 619 | if (groupIndex > -1) { |
| 620 | const nextGroup = Object.assign( |
| 621 | {}, |
| 622 | nextGroups[groupIndex], |
| 623 | groupValues |
| 624 | ); |
| 625 | nextGroups[groupIndex] = nextGroup; |
| 626 | |
| 627 | this.setState({ |
| 628 | groups: nextGroups, |
| 629 | }); |
| 630 | } |
| 631 | } |
| 632 | |
| 633 | public updateCurrentGroup(currentValues: Partial<IEditorGroup>) { |
| 634 | const { current } = this.state; |
no test coverage detected