Skip to content

Commit c496536

Browse files
committed
[ZEPPELIN-6294] fix: change order of detectChanges because cloneParagraph is not work properly
The clone paragraph functionality wasn’t working correctly at the current position, so I moved it.
1 parent 1cdff50 commit c496536

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

zeppelin-web-angular/src/app/pages/workspace/notebook/notebook.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,10 @@ export class NotebookComponent extends MessageListenersManager implements OnInit
163163
}
164164
const definedNote = this.note;
165165
definedNote.paragraphs.splice(data.index, 0, data.paragraph);
166-
this.cdr.detectChanges();
167166
const paragraphIndex = definedNote.paragraphs.findIndex(p => p.id === data.paragraph.id);
168167

169168
definedNote.paragraphs[paragraphIndex].focus = true;
169+
this.cdr.detectChanges();
170170
const addedParagraph = this.listOfNotebookParagraphComponent.find((_, index) => index === paragraphIndex)
171171
?.notebookParagraphCodeEditorComponent;
172172

0 commit comments

Comments
 (0)