MCPcopy Create free account
hub / github.com/DTStack/molecule / updateGroup

Method updateGroup

src/services/workbench/editorService.ts:611–631  ·  view source on GitHub ↗
(
        groupId: UniqueId,
        groupValues: Omit<IEditorGroup, 'id'>
    )

Source from the content-addressed store, hash-verified

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;

Callers 4

updateTabMethod · 0.95
closeOtherMethod · 0.95
closeToRightMethod · 0.95
closeToLeftMethod · 0.95

Calls 2

getGroupIndexByIdMethod · 0.95
setStateMethod · 0.80

Tested by

no test coverage detected