LayerDetail sort fix

This commit is contained in:
Michał Zieliński
2023-08-22 21:29:10 +02:00
parent d019189ec1
commit 093867e88d
3 changed files with 5 additions and 6 deletions

View File

@@ -30,15 +30,14 @@
</div>
<table mat-table [dataSource]="dataSource" matSort matSortActive="code" matSortDisableClear matSortDirection="desc">
<!-- ID Column -->
<ng-container matColumnDef="code">
<th mat-header-cell *matHeaderCellDef mat-sort-header>Code</th>
<td mat-cell *matCellDef="let row"> {{row.code}} </td>
</ng-container>
<ng-container matColumnDef="value">
<ng-container matColumnDef="value1">
<th mat-header-cell *matHeaderCellDef mat-sort-header>Value1</th>
<td mat-cell *matCellDef="let row"> {{row.value1 | number:'1.2-2'}} </td>
<td mat-cell *matCellDef="let row"> {{row.value1}} </td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns, sticky: true"></tr>

View File

@@ -1,8 +1,8 @@
import { DatePipe, NgIf, DecimalPipe, JsonPipe } from '@angular/common';
import { HttpClient } from '@angular/common/http';
import { AfterViewInit, Component, OnInit, ViewChild } from '@angular/core';
import { Component, OnInit, ViewChild } from '@angular/core';
import { UntypedFormGroup, UntypedFormBuilder, FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MatSort, MatSortModule, MatSortable } from '@angular/material/sort';
import { MatSort, MatSortModule } from '@angular/material/sort';
import { MatTableDataSource, MatTableModule } from '@angular/material/table';
import { ActivatedRoute } from '@angular/router';
import { Layer } from 'src/app/models/layer.model';

View File

@@ -15,7 +15,7 @@ export const environment = {
},
views: {
layers: {
recordColumns: "code|value"
recordColumns: "code|value1"
}
}
};