@trudb/tru-common-lib 0.2.488 → 0.2.490

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.
@@ -7664,29 +7664,6 @@ class TruDataGridHeaderFilter {
7664
7664
  constructor() { }
7665
7665
  agInit(params) {
7666
7666
  this.filterParams = params;
7667
- this.typesOfSort = [
7668
- {
7669
- value: 'asc',
7670
- label: 'Sort A to Z',
7671
- selected: false,
7672
- display: () => { return !this.filterParams.column.isSortAscending(); },
7673
- icon: 'asc-sort-menu-icon'
7674
- },
7675
- {
7676
- value: 'desc',
7677
- label: 'Sort Z to A',
7678
- selected: false,
7679
- display: () => { return !this.filterParams.column.isSortDescending(); },
7680
- icon: 'desc-sort-menu-icon'
7681
- },
7682
- {
7683
- value: null,
7684
- label: 'Clear Sort',
7685
- selected: false,
7686
- display: () => { return this.filterParams.column.isSortAscending() || this.filterParams.column.isSortDescending(); },
7687
- icon: 'no-sort-icon'
7688
- }
7689
- ];
7690
7667
  }
7691
7668
  isFilterActive() {
7692
7669
  return this.filterText != null && this.filterText !== '';
@@ -7713,6 +7690,29 @@ class TruDataGridHeaderFilter {
7713
7690
  }
7714
7691
  afterGuiAttached(params) {
7715
7692
  this.guiFilterParams = params;
7693
+ this.typesOfSort = [
7694
+ {
7695
+ value: 'asc',
7696
+ label: 'Sort A to Z',
7697
+ selected: false,
7698
+ display: () => { return !this.filterParams.column.isSortAscending(); },
7699
+ icon: 'asc-sort-menu-icon'
7700
+ },
7701
+ {
7702
+ value: 'desc',
7703
+ label: 'Sort Z to A',
7704
+ selected: false,
7705
+ display: () => { return !this.filterParams.column.isSortDescending(); },
7706
+ icon: 'desc-sort-menu-icon'
7707
+ },
7708
+ {
7709
+ value: null,
7710
+ label: 'Clear Sort',
7711
+ selected: false,
7712
+ display: () => { return this.filterParams.column.isSortAscending() || this.filterParams.column.isSortDescending(); },
7713
+ icon: 'no-sort-icon'
7714
+ }
7715
+ ];
7716
7716
  }
7717
7717
  onFilterInputChanged() {
7718
7718
  this.filterParams.filterChangedCallback();
@@ -7726,7 +7726,7 @@ class TruDataGridHeaderFilter {
7726
7726
  <div class="tru-data-grid-header-filter-container">
7727
7727
  <mat-selection-list #sort [multiple]="false" (selectionChange)="onSortSelection($event)">
7728
7728
  @for (typeOfSort of typesOfSort; track typeOfSort.value) {
7729
- <mat-list-option [value]='typeOfSort' *ngIf="typeOfSort.display()">
7729
+ <mat-list-option [selected]="typeOfSort.selected" [value]='typeOfSort' *ngIf="typeOfSort.display()">
7730
7730
  <mat-icon [svgIcon]="typeOfSort.icon"></mat-icon>
7731
7731
  <span matListItem>{{typeOfSort.label}}</span>
7732
7732
  </mat-list-option>
@@ -7770,7 +7770,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
7770
7770
  <div class="tru-data-grid-header-filter-container">
7771
7771
  <mat-selection-list #sort [multiple]="false" (selectionChange)="onSortSelection($event)">
7772
7772
  @for (typeOfSort of typesOfSort; track typeOfSort.value) {
7773
- <mat-list-option [value]='typeOfSort' *ngIf="typeOfSort.display()">
7773
+ <mat-list-option [selected]="typeOfSort.selected" [value]='typeOfSort' *ngIf="typeOfSort.display()">
7774
7774
  <mat-icon [svgIcon]="typeOfSort.icon"></mat-icon>
7775
7775
  <span matListItem>{{typeOfSort.label}}</span>
7776
7776
  </mat-list-option>