File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,8 @@ class CellSidebarFactory implements IDisposable {
3232 protected panel : NotebookPanel ,
3333 protected commands : CommandRegistry ,
3434 protected nbgrader : boolean = false ,
35- protected sidebarWidth : number = 120
35+ protected sidebarWidth : number = 120 ,
36+ protected factory : React . JSXElementConstructor < ICellSidebarProps > = CellSidebar
3637 ) {
3738 this . _onModelChanged ( panel . content ) ;
3839 panel . content . modelChanged . connect ( this . _onModelChanged , this ) ;
@@ -59,9 +60,10 @@ class CellSidebarFactory implements IDisposable {
5960 private _addSidebar ( model : ICellModel ) : void {
6061 const cell = this . _getCell ( model ) ;
6162 if ( cell ) {
63+ const Element = this . factory ;
6264 const sidebar = ReactWidget . create (
6365 < JupyterReactTheme >
64- < CellSidebar
66+ < Element
6567 commands = { this . commands }
6668 model = { model }
6769 nbgrader = { this . nbgrader }
@@ -155,7 +157,8 @@ export class CellSidebarExtension implements DatalayerNotebookExtension {
155157 panel ,
156158 this . commands ! ,
157159 this . nbgrader ,
158- this . sidebarWidth
160+ this . sidebarWidth ,
161+ this . factory
159162 ) ;
160163 return sidebar ;
161164 }
You can’t perform that action at this time.
0 commit comments