mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
added conditional class to declarativetable for checkbox cells (#16013)
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
<tr role="row">
|
<tr role="row">
|
||||||
<ng-container *ngFor="let column of columns; let c = index;">
|
<ng-container *ngFor="let column of columns; let c = index;">
|
||||||
<th class="declarative-table-header" aria-sort="none" [style.width]="getColumnWidth(column)"
|
<th class="declarative-table-header" aria-sort="none" [style.width]="getColumnWidth(column)"
|
||||||
|
[ngClass]="{'declarative-table-cell-checkbox' : isCheckBox(c)}"
|
||||||
[ngStyle]="column.headerCssStyles" [attr.aria-label]="getHeaderAriaLabel(c)">
|
[ngStyle]="column.headerCssStyles" [attr.aria-label]="getHeaderAriaLabel(c)">
|
||||||
{{column.displayName}}
|
{{column.displayName}}
|
||||||
<checkbox *ngIf="headerCheckboxVisible(c)" [checked]="isHeaderChecked(c)"
|
<checkbox *ngIf="headerCheckboxVisible(c)" [checked]="isHeaderChecked(c)"
|
||||||
@@ -20,6 +21,7 @@
|
|||||||
<ng-container *ngFor="let cellData of row;let c = index;trackBy:trackByFnCols">
|
<ng-container *ngFor="let cellData of row;let c = index;trackBy:trackByFnCols">
|
||||||
<td class="declarative-table-cell" [style.width]="getColumnWidth(c)"
|
<td class="declarative-table-cell" [style.width]="getColumnWidth(c)"
|
||||||
[attr.aria-label]="getAriaLabel(r, c)"
|
[attr.aria-label]="getAriaLabel(r, c)"
|
||||||
|
[ngClass]="{'declarative-table-cell-checkbox' : isCheckBox(c)}"
|
||||||
[ngStyle]="mergeCss(columns[c].rowCssStyles, cellData.style)" role="gridcell">
|
[ngStyle]="mergeCss(columns[c].rowCssStyles, cellData.style)" role="gridcell">
|
||||||
<checkbox *ngIf="isCheckBox(c)" label="" (onChange)="onCheckBoxChanged($event,r,c)"
|
<checkbox *ngIf="isCheckBox(c)" label="" (onChange)="onCheckBoxChanged($event,r,c)"
|
||||||
[enabled]="isControlEnabled(r, c)" [checked]="isChecked(r,c)"
|
[enabled]="isControlEnabled(r, c)" [checked]="isChecked(r,c)"
|
||||||
|
|||||||
@@ -20,13 +20,6 @@
|
|||||||
border: 1px solid;
|
border: 1px solid;
|
||||||
}
|
}
|
||||||
|
|
||||||
.declarative-table-cell>checkbox {
|
|
||||||
float: left;
|
|
||||||
margin: 0 auto;
|
|
||||||
width: 100%;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.declarative-table .declarative-table-cell .codicon.toggle-more {
|
.declarative-table .declarative-table-cell .codicon.toggle-more {
|
||||||
border-width: 0px;
|
border-width: 0px;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
@@ -34,3 +27,11 @@
|
|||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.declarative-table checkbox input[type='checkbox'] {
|
||||||
|
margin: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.declarative-table-cell-checkbox {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user