File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ import { ReactWidget } from '@jupyterlab/apputils';
33import { NotebookPanel } from '@jupyterlab/notebook' ;
44import { HTMLSelect } from '@jupyterlab/ui-components' ;
55import { deepnoteMetadataSchema } from '../types' ;
6+ import { Widget } from '@lumino/widgets' ;
7+ import { Message , MessageLoop } from '@lumino/messaging' ;
68
79export class NotebookPicker extends ReactWidget {
810 private selected : string | null = null ;
@@ -63,6 +65,13 @@ export class NotebookPicker extends ReactWidget {
6365 this . update ( ) ;
6466 } ;
6567
68+ protected onAfterAttach ( msg : Message ) : void {
69+ super . onAfterAttach ( msg ) ;
70+ requestAnimationFrame ( ( ) => {
71+ MessageLoop . sendMessage ( this . parent ! , Widget . ResizeMessage . UnknownSize ) ;
72+ } ) ;
73+ }
74+
6675 render ( ) : JSX . Element {
6776 const deepnoteMetadata = this . panel . context . model . getMetadata ( 'deepnote' ) ;
6877
@@ -81,7 +90,7 @@ export class NotebookPicker extends ReactWidget {
8190 aria-label = "Select active notebook"
8291 title = "Select active notebook"
8392 style = { {
84- maxWidth : '120px' ,
93+ width : '120px' ,
8594 textOverflow : 'ellipsis' ,
8695 whiteSpace : 'nowrap' ,
8796 overflow : 'hidden'
You can’t perform that action at this time.
0 commit comments