@trudb/tru-common-lib 0.1.956 → 0.1.958

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.
@@ -6043,7 +6043,7 @@ class TruDataGridHeaderFilter {
6043
6043
  icon: 'desc-sort-icon'
6044
6044
  },
6045
6045
  {
6046
- value: 'clear',
6046
+ value: null,
6047
6047
  label: 'Clear Sort',
6048
6048
  selected: false,
6049
6049
  display: this.filterParams.column.isSortAscending() || this.filterParams.column.isSortDescending(),
@@ -6079,16 +6079,15 @@ class TruDataGridHeaderFilter {
6079
6079
  onFilterInputChanged() {
6080
6080
  this.filterParams.filterChangedCallback();
6081
6081
  }
6082
- onSortSelection = (event) => {
6083
- let value = event.options[0].value === 'clear' ? null : event.options[0].value;
6084
- this.filterParams.colDef.headerComponentParams.setSort(value, false);
6082
+ onSortSelection = (changeEvent) => {
6083
+ this.filterParams.colDef.headerComponent.params.setSort(changeEvent.options[0].value, false);
6085
6084
  };
6086
6085
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: TruDataGridHeaderFilter, deps: [], target: i0.ɵɵFactoryTarget.Component });
6087
6086
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.3", type: TruDataGridHeaderFilter, isStandalone: true, selector: "ng-component", ngImport: i0, template: `
6088
6087
  <div class="tru-data-grid-header-filter-container">
6089
6088
  <mat-selection-list #sort [multiple]="false" (selectionChange)="onSortSelection($event)">
6090
6089
  @for (typeOfSort of typesOfSort; track typeOfSort.value) {
6091
- <mat-list-option>
6090
+ <mat-list-option [value]='typeOfSort'>
6092
6091
  <mat-icon [svgIcon]="typeOfSort.icon"></mat-icon>
6093
6092
  <span matListItem>{{typeOfSort.label}}</span>
6094
6093
  </mat-list-option>
@@ -6132,7 +6131,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImpor
6132
6131
  <div class="tru-data-grid-header-filter-container">
6133
6132
  <mat-selection-list #sort [multiple]="false" (selectionChange)="onSortSelection($event)">
6134
6133
  @for (typeOfSort of typesOfSort; track typeOfSort.value) {
6135
- <mat-list-option>
6134
+ <mat-list-option [value]='typeOfSort'>
6136
6135
  <mat-icon [svgIcon]="typeOfSort.icon"></mat-icon>
6137
6136
  <span matListItem>{{typeOfSort.label}}</span>
6138
6137
  </mat-list-option>