@@ -30,6 +30,8 @@ import { NotebookEditorWidgetService } from './service/notebook-editor-widget-se
30
30
import { NotebookMainToolbarRenderer } from './view/notebook-main-toolbar' ;
31
31
import { Deferred } from '@theia/core/lib/common/promise-util' ;
32
32
33
+ const PerfectScrollbar = require ( 'react-perfect-scrollbar' ) ;
34
+
33
35
export const NotebookEditorWidgetContainerFactory = Symbol ( 'NotebookEditorWidgetContainerFactory' ) ;
34
36
35
37
export function createNotebookEditorWidgetContainer ( parent : interfaces . Container , props : NotebookEditorProps ) : interfaces . Container {
@@ -102,6 +104,10 @@ export class NotebookEditorWidget extends ReactWidget implements Navigatable, Sa
102
104
this . id = NOTEBOOK_EDITOR_ID_PREFIX + this . props . uri . toString ( ) ;
103
105
this . node . tabIndex = - 1 ;
104
106
107
+ this . scrollOptions = {
108
+ suppressScrollY : true
109
+ } ;
110
+
105
111
this . title . closable = true ;
106
112
this . update ( ) ;
107
113
@@ -145,12 +151,14 @@ export class NotebookEditorWidget extends ReactWidget implements Navigatable, Sa
145
151
146
152
protected render ( ) : ReactNode {
147
153
if ( this . _model ) {
148
- return < div >
154
+ return < div className = 'theia-notebook-main-container' >
149
155
{ this . notebookMainToolbarRenderer . render ( this . _model ) }
150
- < NotebookCellListView renderers = { this . renderers }
151
- notebookModel = { this . _model }
152
- toolbarRenderer = { this . cellToolbarFactory }
153
- commandRegistry = { this . commandRegistry } />
156
+ < PerfectScrollbar className = 'theia-notebook-scroll-container' >
157
+ < NotebookCellListView renderers = { this . renderers }
158
+ notebookModel = { this . _model }
159
+ toolbarRenderer = { this . cellToolbarFactory }
160
+ commandRegistry = { this . commandRegistry } />
161
+ </ PerfectScrollbar >
154
162
</ div > ;
155
163
} else {
156
164
return < div > </ div > ;
0 commit comments