add listener for celltype change (#17414)

This commit is contained in:
Lucy Zhang
2021-10-20 13:51:27 -07:00
committed by GitHub
parent c89aa26c0a
commit 8212eecec7

View File

@@ -82,6 +82,9 @@ export class SplitCellAction extends CellActionBase {
this._register(context.cell.onCurrentEditModeChanged(currentMode => {
this.enabled = currentMode === CellEditModes.WYSIWYG ? false : true;
}));
this._register(context.cell.notebookModel.onCellTypeChanged(_ => {
this.enabled = context.cell.currentMode === CellEditModes.WYSIWYG ? false : true;
}));
}
}