mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-21 01:25:37 -05:00
Bring in all the extensibility updates we added during the hackathon (#2056)
Extensibility updates
This commit is contained in:
@@ -36,10 +36,7 @@ export enum DeclarativeDataType {
|
||||
<thead>
|
||||
<tr style="display:block;">
|
||||
<ng-container *ngFor="let column of columns;let h = index">
|
||||
|
||||
<td class="declarative-table-header" tabindex="-1" [style.width]="getColumnWidth(h)" role="button" aria-sort="none">{{column.displayName}}</td>
|
||||
|
||||
|
||||
</ng-container>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -183,7 +180,13 @@ export default class DeclarativeTableComponent extends ComponentBase implements
|
||||
let cellData = this.data[row][cell];
|
||||
if (cellData && column.categoryValues) {
|
||||
let category = column.categoryValues.find(v => v.name === cellData);
|
||||
return category.displayName;
|
||||
if (category) {
|
||||
return category.displayName;
|
||||
} else if (this.isEditableSelectBox(cell)) {
|
||||
return cellData;
|
||||
} else {
|
||||
return undefined;
|
||||
}
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
.declarative-table {
|
||||
padding: 5px 30px 0px 30px;
|
||||
box-sizing: border-box;
|
||||
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ import { RowSelectionModel } from 'sql/base/browser/ui/table/plugins/rowSelectio
|
||||
@Component({
|
||||
selector: 'modelview-table',
|
||||
template: `
|
||||
<div #table style="width: 100%;height:100%"></div>
|
||||
<div #table style="width: 100%;height:100%" [style.font-size]="fontSize"></div>
|
||||
`
|
||||
})
|
||||
export default class TableComponent extends ComponentBase implements IComponent, OnDestroy, AfterViewInit {
|
||||
@@ -98,7 +98,7 @@ export default class TableComponent extends ComponentBase implements IComponent,
|
||||
syncColumnCellResize: true,
|
||||
enableColumnReorder: false,
|
||||
enableCellNavigation: true,
|
||||
forceFitColumns: true,
|
||||
forceFitColumns: true
|
||||
};
|
||||
|
||||
this._table = new Table<Slick.SlickData>(this._inputContainer.nativeElement, this._tableData, this._tableColumns, options);
|
||||
@@ -178,6 +178,10 @@ export default class TableComponent extends ComponentBase implements IComponent,
|
||||
return this.getPropertyOrDefault<sqlops.TableComponentProperties, string[]>((props) => props.columns, []);
|
||||
}
|
||||
|
||||
public get fontSize(): number | string {
|
||||
return this.getPropertyOrDefault<sqlops.TableComponentProperties, number | string>((props) => props.fontSize, '');
|
||||
}
|
||||
|
||||
public set columns(newValue: string[]) {
|
||||
this.setPropertyFromUI<sqlops.TableComponentProperties, string[]>((props, value) => props.columns = value, newValue);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user