Fixed navigation to single dfg project from person projects
LocationBasedServices/smartguide/pipeline/head This commit looks good
LocationBasedServices/smartguide/pipeline/head This commit looks good
This commit is contained in:
@@ -17,7 +17,6 @@ import {
|
||||
SortDirection,
|
||||
} from '@angular/material/sort';
|
||||
import { MatTableDataSource, MatTableModule } from '@angular/material/table';
|
||||
import { Router } from '@angular/router';
|
||||
|
||||
export interface BaseColumn<T> {
|
||||
id: string;
|
||||
@@ -58,8 +57,6 @@ export class DataTableComponent<T> implements AfterViewInit {
|
||||
|
||||
activeSortKey = input<string>('');
|
||||
sortDirection = input<SortDirection>('');
|
||||
navigatePrefix=input<string>('');
|
||||
navigateField=input<string>('');
|
||||
sortChange = output<Sort>();
|
||||
|
||||
displayedColumns = computed(() => this.columns().map((col) => col.id));
|
||||
@@ -67,7 +64,7 @@ export class DataTableComponent<T> implements AfterViewInit {
|
||||
|
||||
sort = viewChild.required(MatSort);
|
||||
|
||||
constructor(private router:Router) {
|
||||
constructor() {
|
||||
effect(() => {
|
||||
const currentData = this.data();
|
||||
|
||||
@@ -112,16 +109,6 @@ export class DataTableComponent<T> implements AfterViewInit {
|
||||
this.sortChange.emit(sort);
|
||||
}
|
||||
|
||||
navigateToDataField(row: any): void {
|
||||
if (!this.navigatePrefix() || !this.navigateField()) {
|
||||
return;
|
||||
}
|
||||
const value = row[this.navigateField()];
|
||||
if (value != null) {
|
||||
this.router.navigate([this.navigatePrefix(), value]);
|
||||
}
|
||||
}
|
||||
|
||||
toggleRow(row: T): void {
|
||||
if (!this.detailTemplate()) return;
|
||||
this.expandedElement.update((current) => (current === row ? null : row));
|
||||
|
||||
Reference in New Issue
Block a user