Skip to content

Commit d2ae94c

Browse files
fix: aggrid doesn't load in Voila>=0.5
Voila uses a different location for extensions, which can be found in jupyter-config-data. This setting is also available in Lab, so we should use that. For older versions of Lab there is still a hard coded fallback.
1 parent 261645f commit d2ae94c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

js/src/labplugin.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ const id = 'ipyaggrid:plugin';
77
const requires = [base.IJupyterWidgetRegistry];
88
const autoStart = true;
99

10-
const baseUrl = JSON.parse(document.getElementById("jupyter-config-data").textContent).baseUrl;
11-
__webpack_public_path__ = `${baseUrl}lab/extensions/ipyaggrid/static/`;
10+
const conf = JSON.parse(document.getElementById("jupyter-config-data").textContent);
11+
__webpack_public_path__ = (conf.fullLabextensionsUrl || `${conf.baseUrl}lab/extensions`) + "/ipyaggrid/static/";
1212

1313
const activate = (app, widgets) => {
1414
console.log('JupyterLab extension ipyaggrid is activated!');

0 commit comments

Comments
 (0)