From 72d2920dc30b19d435bd6101a0e9c51e1d26bcfd Mon Sep 17 00:00:00 2001 From: Anthony Dresser Date: Fri, 7 Sep 2018 16:22:40 -0700 Subject: [PATCH] add table options to fix column widths (#2458) --- src/sql/parts/query/editor/gridPanel.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/sql/parts/query/editor/gridPanel.ts b/src/sql/parts/query/editor/gridPanel.ts index 4d00edb5ca..451e34a48b 100644 --- a/src/sql/parts/query/editor/gridPanel.ts +++ b/src/sql/parts/query/editor/gridPanel.ts @@ -305,7 +305,13 @@ class GridTable extends Disposable implements IView { }); }); this.columns.unshift(numberColumn.getColumnDefinition()); - this.table = this._register(new Table(tableContainer, { dataProvider: new AsyncDataProvider(collection), columns: this.columns }, { rowHeight: ROW_HEIGHT, showRowNumber: true })); + let tableOptions: Slick.GridOptions = { + rowHeight: ROW_HEIGHT, + showRowNumber: true, + forceFitColumns: false, + defaultColumnWidth: 120 + }; + this.table = this._register(new Table(tableContainer, { dataProvider: new AsyncDataProvider(collection), columns: this.columns }, tableOptions)); this.table.setSelectionModel(this.selectionModel); this.table.registerPlugin(new MouseWheelSupport()); this.table.registerPlugin(new AutoColumnSize());