Skip to content

Commit 37f8531

Browse files
committed
Fix scrollbar issues when grid is rendered in a container
Signed-off-by: Itay Dafna <[email protected]>
1 parent c0fd0fc commit 37f8531

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

js/datagrid.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { CellRenderer } from '@lumino/datagrid';
99

1010
import { JSONExt } from '@lumino/coreutils';
1111

12-
import { MessageLoop } from '@lumino/messaging';
12+
import { MessageLoop, Message } from '@lumino/messaging';
1313

1414
import { Widget } from '@lumino/widgets';
1515

@@ -357,6 +357,18 @@ export class DataGridView extends DOMWidgetView {
357357
MessageLoop.postMessage(this.pWidget, Widget.ResizeMessage.UnknownSize);
358358
};
359359

360+
processPhosphorMessage(msg: Message): void {
361+
super.processPhosphorMessage(msg);
362+
363+
switch (msg.type) {
364+
case 'after-show':
365+
if (this.pWidget.isVisible) {
366+
this.manageResizeEvent();
367+
}
368+
break;
369+
}
370+
}
371+
360372
render() {
361373
this.el.classList.add('datagrid-container');
362374

0 commit comments

Comments
 (0)