mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-16 09:35:36 -05:00
Feat/importpreview2 (#6506)
* Allow column resizing in preview table * added property to TableComponentProperties * hooked up new prop into model view * new setOptions * adding enum to azdata interface * bring in slickgrid 2.3.30 * PR feedback
This commit is contained in:
@@ -13,7 +13,7 @@ import * as vscode from 'vscode';
|
||||
import * as azdata from 'azdata';
|
||||
|
||||
import { SqlMainContext, ExtHostModelViewShape, MainThreadModelViewShape, ExtHostModelViewTreeViewsShape } from 'sql/workbench/api/common/sqlExtHost.protocol';
|
||||
import { IItemConfig, ModelComponentTypes, IComponentShape, IComponentEventArgs, ComponentEventType } from 'sql/workbench/api/common/sqlExtHostTypes';
|
||||
import { IItemConfig, ModelComponentTypes, IComponentShape, IComponentEventArgs, ComponentEventType, ColumnSizingMode } from 'sql/workbench/api/common/sqlExtHostTypes';
|
||||
import { IExtensionDescription } from 'vs/platform/extensions/common/extensions';
|
||||
|
||||
class ModelBuilderImpl implements azdata.ModelBuilder {
|
||||
@@ -1126,6 +1126,13 @@ class TableComponentWrapper extends ComponentWrapper implements azdata.TableComp
|
||||
this.setProperty('selectedRows', v);
|
||||
}
|
||||
|
||||
public get forceFitColumns(): ColumnSizingMode {
|
||||
return this.properties['forceFitColumns'];
|
||||
}
|
||||
public set forceFitColunms(v: ColumnSizingMode) {
|
||||
this.setProperty('forceFitColumns', v);
|
||||
}
|
||||
|
||||
public get onRowSelected(): vscode.Event<any> {
|
||||
let emitter = this._emitterMap.get(ComponentEventType.onSelectedRowChanged);
|
||||
return emitter && emitter.event;
|
||||
|
||||
@@ -169,6 +169,12 @@ export enum ModelComponentTypes {
|
||||
Hyperlink
|
||||
}
|
||||
|
||||
export enum ColumnSizingMode {
|
||||
ForceFit = 0, // all columns will be sized to fit in viewable space, no horiz scroll bar
|
||||
AutoFit = 1, // columns will be ForceFit up to a certain number; currently 3. At 4 or more the behavior will switch to NO force fit
|
||||
DataFit = 2 // columns use sizing based on cell data, horiz scroll bar present if more cells than visible in view area
|
||||
}
|
||||
|
||||
export enum AgentSubSystem {
|
||||
TransactSql = 1,
|
||||
ActiveScripting = 2,
|
||||
|
||||
@@ -554,7 +554,8 @@ export function createApiFactory(
|
||||
ActionOnCellCheckboxCheck: sqlExtHostTypes.ActionOnCellCheckboxCheck,
|
||||
StepCompletionAction: sqlExtHostTypes.StepCompletionAction,
|
||||
AgentSubSystem: sqlExtHostTypes.AgentSubSystem,
|
||||
ExtensionNodeType: sqlExtHostTypes.ExtensionNodeType
|
||||
ExtensionNodeType: sqlExtHostTypes.ExtensionNodeType,
|
||||
ColumnSizingMode: sqlExtHostTypes.ColumnSizingMode
|
||||
};
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user