Skip to content

Commit

Permalink
refactor: remove unused getters and broken conditional (onecx#79)
Browse files Browse the repository at this point in the history
Co-authored-by: Bastian Jakobi <[email protected]>
  • Loading branch information
bastianjakobi and Bastian Jakobi committed Feb 6, 2024
1 parent 8b14bf7 commit 247ede4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<span class="icon-button-header-wrapper">
<button
id="sortButton"
*ngIf="column.sortable && sortedObserved"
*ngIf="column.sortable"
class="pi"
[class.pi-sort-alt-slash]="(column?.id === sortColumn && sortDirection === 'NONE') || column?.id !== sortColumn"
[class.pi-sort-amount-up]="column?.id === sortColumn && sortDirection === 'ASCENDING'"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,6 @@ export class DataTableComponent extends DataSortBase implements OnInit {
currentFilterOptions$: Observable<SelectItem[]> | undefined
currentSelectedFilters$: Observable<string[]> | undefined
filterAmounts$: Observable<Record<string, number>> | undefined
get sortedObserved(): boolean {
return this.injector.get('DataViewComponent', null)?.sorted.observed || this.sorted.observed
}
get filteredObserved(): boolean {
return this.injector.get('DataViewComponent', null)?.filtered.observed || this.filtered.observed
}
get viewTableRowObserved(): boolean {
const dv = this.injector.get('DataViewComponent', null)
return dv?.viewItemObserved || dv?.viewItem.observed || this.viewTableRow.observed
Expand Down

0 comments on commit 247ede4

Please sign in to comment.