@trudb/tru-common-lib 0.2.490 → 0.2.492

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7717,16 +7717,20 @@ class TruDataGridHeaderFilter {
7717
7717
  onFilterInputChanged() {
7718
7718
  this.filterParams.filterChangedCallback();
7719
7719
  }
7720
- onSortSelection = (changeEvent) => {
7721
- this.filterParams.colDef.headerComponentParams.setSort(changeEvent.options[0].value.value, false);
7720
+ onSortMenuItemClicked = (event, typeOfSort) => {
7721
+ this.filterParams.colDef.headerComponentParams.setSort(typeOfSort.value, event.shiftKey);
7722
7722
  this.guiFilterParams.hidePopup();
7723
7723
  };
7724
7724
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TruDataGridHeaderFilter, deps: [], target: i0.ɵɵFactoryTarget.Component });
7725
7725
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TruDataGridHeaderFilter, isStandalone: true, selector: "ng-component", ngImport: i0, template: `
7726
7726
  <div class="tru-data-grid-header-filter-container">
7727
- <mat-selection-list #sort [multiple]="false" (selectionChange)="onSortSelection($event)">
7727
+ <mat-selection-list #sort [multiple]="false">
7728
7728
  @for (typeOfSort of typesOfSort; track typeOfSort.value) {
7729
- <mat-list-option [selected]="typeOfSort.selected" [value]='typeOfSort' *ngIf="typeOfSort.display()">
7729
+ <mat-list-option
7730
+ [selected]="typeOfSort.selected"
7731
+ [value]='typeOfSort'
7732
+ (click)="onSortMenuItemClicked($event, typeOfSort)"
7733
+ *ngIf="typeOfSort.display()">
7730
7734
  <mat-icon [svgIcon]="typeOfSort.icon"></mat-icon>
7731
7735
  <span matListItem>{{typeOfSort.label}}</span>
7732
7736
  </mat-list-option>
@@ -7768,9 +7772,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
7768
7772
  ReactiveFormsModule
7769
7773
  ], template: `
7770
7774
  <div class="tru-data-grid-header-filter-container">
7771
- <mat-selection-list #sort [multiple]="false" (selectionChange)="onSortSelection($event)">
7775
+ <mat-selection-list #sort [multiple]="false">
7772
7776
  @for (typeOfSort of typesOfSort; track typeOfSort.value) {
7773
- <mat-list-option [selected]="typeOfSort.selected" [value]='typeOfSort' *ngIf="typeOfSort.display()">
7777
+ <mat-list-option
7778
+ [selected]="typeOfSort.selected"
7779
+ [value]='typeOfSort'
7780
+ (click)="onSortMenuItemClicked($event, typeOfSort)"
7781
+ *ngIf="typeOfSort.display()">
7774
7782
  <mat-icon [svgIcon]="typeOfSort.icon"></mat-icon>
7775
7783
  <span matListItem>{{typeOfSort.label}}</span>
7776
7784
  </mat-list-option>