handle cancel #7

This commit is contained in:
Tim Paine 2018-04-05 17:18:42 -04:00
parent b2b4b2d437
commit c0f54ee64b
2 changed files with 5 additions and 1 deletions

View file

@ -1,6 +1,6 @@
{
"name": "jupyterlab_iframe",
"version": "0.1.0",
"version": "0.1.1",
"description": "A JupyterLab extension.",
"author": "Tim Paine",
"main": "lib/index.js",

View file

@ -88,6 +88,10 @@ function activate(app: JupyterLab, docManager: IDocumentManager, palette: IComma
focusNodeSelector: 'input',
buttons: [Dialog.cancelButton(), Dialog.okButton({ label: 'GO' })]
}).then(result => {
if (result.button.label !== 'GO') {
return;
}
if (!result.value) {
return null;
}