mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
use default row height and update button column (#10885)
This commit is contained in:
@@ -165,7 +165,7 @@
|
|||||||
|
|
||||||
.slick-icon-cell-content,
|
.slick-icon-cell-content,
|
||||||
.slick-button-cell-content {
|
.slick-button-cell-content {
|
||||||
background-position: 7px center !important;
|
background-position: 5px center !important;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-size: 16px !important;
|
background-size: 16px !important;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -176,10 +176,6 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.slick-button-cell {
|
|
||||||
padding: 5px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.slick-button-cell-content {
|
.slick-button-cell-content {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
border-width: 0px;
|
border-width: 0px;
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ export interface ButtonColumnDefinition<T extends Slick.SlickData> extends TextW
|
|||||||
export interface ButtonColumnOptions {
|
export interface ButtonColumnOptions {
|
||||||
iconCssClass?: string;
|
iconCssClass?: string;
|
||||||
title?: string;
|
title?: string;
|
||||||
width?: number;
|
|
||||||
id?: string;
|
id?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -38,10 +37,9 @@ export class ButtonColumn<T extends Slick.SlickData> implements Slick.Plugin<T>
|
|||||||
formatter: (row: number, cell: number, value: any, columnDef: Slick.Column<T>, dataContext: T): string => {
|
formatter: (row: number, cell: number, value: any, columnDef: Slick.Column<T>, dataContext: T): string => {
|
||||||
return this.formatter(row, cell, value, columnDef, dataContext);
|
return this.formatter(row, cell, value, columnDef, dataContext);
|
||||||
},
|
},
|
||||||
width: options.width,
|
width: 30,
|
||||||
selectable: false,
|
selectable: false,
|
||||||
iconCssClassField: options.iconCssClass,
|
iconCssClassField: options.iconCssClass
|
||||||
cssClass: 'slick-button-cell'
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -66,13 +66,12 @@ export class ExplorerTable extends Disposable {
|
|||||||
this._view = new TableDataView<Slick.SlickData>(undefined, undefined, undefined, (data: Slick.SlickData[]): Slick.SlickData[] => {
|
this._view = new TableDataView<Slick.SlickData>(undefined, undefined, undefined, (data: Slick.SlickData[]): Slick.SlickData[] => {
|
||||||
return explorerFilter.filter(this._filterStr, data);
|
return explorerFilter.filter(this._filterStr, data);
|
||||||
});
|
});
|
||||||
this._table = new Table<Slick.SlickData>(parentElement, { dataProvider: this._view }, { forceFitColumns: true, rowHeight: 35 });
|
this._table = new Table<Slick.SlickData>(parentElement, { dataProvider: this._view }, { forceFitColumns: true });
|
||||||
this._table.setSelectionModel(new RowSelectionModel());
|
this._table.setSelectionModel(new RowSelectionModel());
|
||||||
this._actionsColumn = new ButtonColumn<Slick.SlickData>({
|
this._actionsColumn = new ButtonColumn<Slick.SlickData>({
|
||||||
id: 'actions',
|
id: 'actions',
|
||||||
iconCssClass: 'toggle-more',
|
iconCssClass: 'toggle-more',
|
||||||
title: ShowActionsText,
|
title: ShowActionsText
|
||||||
width: 40
|
|
||||||
});
|
});
|
||||||
this._table.registerPlugin(this._actionsColumn);
|
this._table.registerPlugin(this._actionsColumn);
|
||||||
this._register(this._actionsColumn.onClick((args) => {
|
this._register(this._actionsColumn.onClick((args) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user