Bring in all the extensibility updates we added during the hackathon (#2056)

Extensibility updates
This commit is contained in:
Amir Ali Omidi
2018-07-26 16:33:32 -07:00
committed by GitHub
parent 87bb2c74d9
commit 4daf3280ff
10 changed files with 70 additions and 10 deletions

View File

@@ -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);
}