reverting a change in declarative table (#2246)

This commit is contained in:
Leila Lali
2018-08-17 14:50:41 -07:00
committed by GitHub
parent d10e08e63e
commit 1b6328b451
3 changed files with 5 additions and 10 deletions

View File

@@ -32,18 +32,15 @@ export enum DeclarativeDataType {
@Component({
selector: 'modelview-declarativeTable',
template: `
<table role=grid aria-labelledby="ID_REF" #container *ngIf="columns" class="declarative-table">
<table role=grid aria-labelledby="ID_REF" #container *ngIf="columns" class="declarative-table" [style.height]="getHeight()">
<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>
<th class="declarative-table-header" tabindex="-1" role="button" aria-sort="none">{{column.displayName}}</th>
</ng-container>
</tr>
</thead>
<ng-container *ngIf="data">
<tbody style="display: block; width:100%; overflow-y: scroll" [style.height]="getHeight()">
<ng-container *ngFor="let row of data;let r = index">
<tr class="declarative-table-row">
<tr class="declarative-table-row" >
<ng-container *ngFor="let cellData of row;let c = index">
<td class="declarative-table-cell" tabindex="-1" role="button" [style.width]="getColumnWidth(c)">
<checkbox *ngIf="isCheckBox(c)" label="" (onChange)="onCheckBoxChanged($event,r,c)" [enabled]="isControlEnabled(c)" [checked]="isChecked(r,c)"></checkbox>
@@ -54,9 +51,7 @@ export enum DeclarativeDataType {
</td>
</ng-container>
</tr>
</ng-container>
</tbody>
</ng-container>
</table>
`

View File

@@ -715,7 +715,7 @@ declare module 'sqlops' {
* Register model view content for the dialog.
* Doesn't do anything if model view is already registered
*/
registerContent(handler: (view: ModelView) => void): void;
registerContent(handler: (view: ModelView) => Thenable<void>): void;
/**
* Returns the model view content if registered. Returns undefined if model review is not registered

View File

@@ -36,7 +36,7 @@ class ModelViewPanelImpl implements sqlops.window.modelviewdialog.ModelViewPanel
this._onValidityChanged(valid => this._valid = valid);
}
public registerContent(handler: (view: sqlops.ModelView) => void): void {
public registerContent(handler: (view: sqlops.ModelView) => Thenable<void>): void {
if (!this._modelViewId) {
let viewId = this._viewType + this._handle;
this.setModelViewId(viewId);