Browse Source

UI: Improvement table columns assigment

pull/5023/head
Vladyslav_Prykhodko 5 years ago
parent
commit
11ae8ec845
  1. 6
      ui-ngx/src/app/modules/home/components/import-export/table-columns-assignment.component.html
  2. 7
      ui-ngx/src/app/modules/home/components/import-export/table-columns-assignment.component.scss

6
ui-ngx/src/app/modules/home/components/import-export/table-columns-assignment.component.html

@ -23,13 +23,13 @@
</mat-cell>
</ng-container>
<ng-container matColumnDef="sampleData">
<mat-header-cell *matHeaderCellDef style="flex: 0 0 30%;" class="mat-column-sampleData"> {{ 'import.column-example' | translate }} </mat-header-cell>
<mat-header-cell *matHeaderCellDef class="mat-column-sampleData"> {{ 'import.column-example' | translate }} </mat-header-cell>
<mat-cell *matCellDef="let column">
{{column.sampleData}}
</mat-cell>
</ng-container>
<ng-container matColumnDef="type">
<mat-header-cell *matHeaderCellDef style="flex: 0 0 40%" class="mat-column-type"> {{ 'import.column-type.column-type' | translate }} </mat-header-cell>
<mat-header-cell *matHeaderCellDef class="mat-column-type"> {{ 'import.column-type.column-type' | translate }} </mat-header-cell>
<mat-cell *matCellDef="let column">
<mat-select [(ngModel)]="column.type" (ngModelChange)="columnsUpdated()">
<mat-option *ngFor="let type of columnTypes" [value]="type.value" [disabled]="type.disabled">
@ -44,7 +44,7 @@
</mat-cell>
</ng-container>
<ng-container matColumnDef="key">
<mat-header-cell *matHeaderCellDef style="flex: 0 0 30%"> {{ 'import.column-key' | translate }} </mat-header-cell>
<mat-header-cell *matHeaderCellDef class="mat-column-key"> {{ 'import.column-key' | translate }} </mat-header-cell>
<mat-cell *matCellDef="let column">
<mat-form-field floatLabel="always" hideRequiredMarker
*ngIf="isColumnTypeDiffers(column.type)">

7
ui-ngx/src/app/modules/home/components/import-export/table-columns-assignment.component.scss

@ -14,14 +14,21 @@
* limitations under the License.
*/
:host {
overflow-x: auto;
.mat-column-order {
flex: 0 0 40px;
}
.mat-column-sampleData {
flex: 0 0 120px;
min-width: 120px;
max-width: 230px;
}
.mat-column-type {
flex: 0 0 180px;
min-width: 180px;
}
.mat-column-key {
flex: 0 0 120px;
min-width: 120px;
}

Loading…
Cancel
Save