Fixed sorting
This commit is contained in:
		| @@ -5,9 +5,11 @@ import { ComponentWithTable } from "../../../base/component-with-table"; | ||||
| export class HideableComponent { | ||||
|   @HostBinding("class.hidden-column") | ||||
|   get hidden() { | ||||
|     return !(this.parent?.isColumnVisible(this.column) ?? true); | ||||
|     const column = this.subColumn ?? this.column; | ||||
|     return !(this.parent?.isColumnVisible(column) ?? true); | ||||
|   }; | ||||
|  | ||||
|   @Input() column!: string; | ||||
|   @Input() subColumn!: string; | ||||
|   @Input() parent!: ComponentWithTable; | ||||
| } | ||||
|   | ||||
| @@ -2,7 +2,7 @@ | ||||
|   <ng-content></ng-content> | ||||
| </ng-template> | ||||
|  | ||||
| <div *ngIf="sortable; else without" [pSortableColumn]="column"> | ||||
| <div *ngIf="sortable; else without" [pSortableColumn]="subColumn ?? column"> | ||||
|   <ng-container *ngTemplateOutlet="content"></ng-container> | ||||
| </div> | ||||
|  | ||||
|   | ||||
| @@ -72,10 +72,10 @@ | ||||
|             </div> | ||||
|           </th> | ||||
|  | ||||
|           <th hideable-th="level" [parent]="this" [sortable]="true"> | ||||
|           <th hideable-th="level" subColumn="level.min_xp" [parent]="this" [sortable]="true"> | ||||
|             <div class="table-header-label"> | ||||
|               <div class="table-header-text">{{'common.level' | translate}}</div> | ||||
|               <p-sortIcon field="level.name" class="table-header-icon"></p-sortIcon> | ||||
|               <p-sortIcon field="level" class="table-header-icon"></p-sortIcon> | ||||
|             </div> | ||||
|           </th> | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user