Skip to content

Commit

Permalink
CB-4765 handle node rename runs in mobx action
Browse files Browse the repository at this point in the history
  • Loading branch information
s.teleshev committed Feb 28, 2024
1 parent 8cc4bf4 commit 6007c24
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,13 @@ export class ObjectViewerTabService {
}

private handleNodeRename(data: INavNodeRenameData, contexts: IExecutionContextProvider<INavNodeRenameData>) {
const context = contexts.getContext(this.objectViewerTabContext);
runInAction(() => {
const context = contexts.getContext(this.objectViewerTabContext);

if (context.tab) {
context.tab.handlerState.objectId = data.newNodeId;
}
if (context.tab) {
context.tab.handlerState.objectId = data.newNodeId;
}
});
}

isPageActive(tab: ITab<IObjectViewerTabState>, page: ObjectPage): boolean {
Expand Down

0 comments on commit 6007c24

Please sign in to comment.