TSK-1466: fix bug in sort component
This commit is contained in:
parent
ea38c7ddba
commit
7693c25efa
|
@ -15,8 +15,8 @@
|
|||
}
|
||||
|
||||
.has-changes {
|
||||
border-bottom: 1px solid $brown;
|
||||
}
|
||||
border-bottom: 1px solid $brown;
|
||||
}
|
||||
|
||||
.table > thead > tr > th {
|
||||
max-width: 150px;
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
}
|
||||
|
||||
.sidenav__drawer__container {
|
||||
display:flex;
|
||||
flex-direction:row;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
color: white;
|
||||
margin-top: 5px;
|
||||
|
@ -36,7 +36,6 @@
|
|||
.sidenav__drawer__container-logout {
|
||||
text-align: end;
|
||||
margin-right: 15px;
|
||||
|
||||
}
|
||||
|
||||
.sidenav__drawer-version {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="sort">
|
||||
<button mat-stroked-button style="color: #555;" [matMenuTriggerFor]="sortMenu" matTooltip="Sort workbaskets">
|
||||
<button class="sort__button" mat-stroked-button style="color: #555;" [matMenuTriggerFor]="sortMenu" matTooltip="Sort workbaskets">
|
||||
<mat-icon>sort</mat-icon>
|
||||
|
||||
<mat-menu #sortMenu="matMenu">
|
||||
|
@ -38,7 +38,7 @@
|
|||
<mat-menu #sortValue="matMenu">
|
||||
<button mat-menu-item *ngFor="let sortingField of sortingFields | mapValues"
|
||||
(click)="changeSortBy(sortingField.key)">
|
||||
<span *ngIf="sortingField.value.toLowerCase() === sort.sortBy; else coloredValue" class="sort__selected-value">
|
||||
<span class="{{sortingField.key === sort.sortBy ? 'sort__selected-value' : ''}}">
|
||||
{{sortingField.value}}
|
||||
</span>
|
||||
<ng-template #coloredValue>
|
||||
|
|
|
@ -4,3 +4,11 @@
|
|||
color: $aquamarine;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.sort__button {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.mat-menu-item {
|
||||
outline: none;
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ import { Direction, Sorting } from 'app/shared/models/sorting';
|
|||
export class SortComponent implements OnInit {
|
||||
@Input() sortingFields: Map<string, string>;
|
||||
@Input() menuPosition = 'right';
|
||||
@Input() defaultSortBy = 'key';
|
||||
@Input() defaultSortBy = 'access-id';
|
||||
|
||||
@Output() performSorting = new EventEmitter<Sorting>();
|
||||
|
||||
|
@ -26,6 +26,7 @@ export class SortComponent implements OnInit {
|
|||
|
||||
changeSortBy(sortBy: string) {
|
||||
this.sort.sortBy = sortBy;
|
||||
console.log(sortBy);
|
||||
this.search();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue