File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,10 @@ import { CellRenderer } from '@lumino/datagrid';
99
1010import { JSONExt } from '@lumino/coreutils' ;
1111
12+ import { MessageLoop } from '@lumino/messaging' ;
13+
14+ import { Widget } from '@lumino/widgets' ;
15+
1216import {
1317 DOMWidgetModel ,
1418 DOMWidgetView ,
@@ -284,9 +288,18 @@ export class DataGridView extends DOMWidgetView {
284288 this . el = this . pWidget . node ;
285289 }
286290
291+ manageResizeEvent = ( ) => {
292+ MessageLoop . postMessage ( this . pWidget , Widget . ResizeMessage . UnknownSize ) ;
293+ } ;
294+
287295 render ( ) {
288296 this . el . classList . add ( 'datagrid-container' ) ;
289297
298+ window . addEventListener ( 'resize' , this . manageResizeEvent ) ;
299+ this . once ( 'remove' , ( ) => {
300+ window . removeEventListener ( 'resize' , this . manageResizeEvent ) ;
301+ } ) ;
302+
290303 this . grid = new FeatherGrid ( {
291304 defaultSizes : {
292305 rowHeight : this . model . get ( 'base_row_size' ) ,
You can’t perform that action at this time.
0 commit comments