add listener for celltype change (#17414) (#17418)

This commit is contained in:
Lucy Zhang
2021-10-20 14:38:35 -07:00
committed by GitHub
parent 07aa256f4c
commit b35ff6451a

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;
}));
}
}