Skip to content

Commit 686e1b8

Browse files
author
minjk-bl
committed
Edit widget change event's api getting prepared for lab4x
1 parent 1d9e221 commit 686e1b8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

visualpython/js/loadVisualpython.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,8 +287,10 @@ define([
287287
} else if (vpConfig.extensionType === 'lab' || vpConfig.extensionType === 'lite') {
288288
// LAB: if widget is ready or changed, ready for lab kernel connected, and restart vp
289289
vpLab.shell._currentChanged.connect(function(s1, value) {
290-
var { newValue } = value;
291-
vpLog.display(VP_LOG_TYPE.DEVELOP, 'jupyterlab shell currently changed', s1, value);
290+
// var { newValue } = value;
291+
// LAB 4.x: get currentWidget
292+
var newValue = s1.currentWidget;
293+
vpLog.display(VP_LOG_TYPE.DEVELOP, 'jupyterlab shell currently changed', s1, newValue);
292294
// kernel restart for notebook and console
293295
if (newValue && newValue.sessionContext) {
294296
vpConfig.hideProtector();

0 commit comments

Comments
 (0)