remove router links
This commit is contained in:
parent
2835c812a1
commit
33da1ce585
@ -21,10 +21,6 @@ export abstract class ListingComponent<T extends IListable> extends AutoUnsubscr
|
||||
readonly noContent$ = this._noContent$;
|
||||
readonly sortedDisplayedEntities$ = this._sortedDisplayedEntities$;
|
||||
readonly listingMode$: Observable<ListingMode>;
|
||||
/**
|
||||
* @deprecated Use routerLink getter from IListable
|
||||
*/
|
||||
readonly routerLinkFn?: (entity: T) => string | string[];
|
||||
|
||||
abstract readonly tableColumnConfigs: readonly TableColumnConfig<T>[];
|
||||
abstract readonly tableHeaderLabel: string;
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
(mouseleave)="itemMouseLeaveFn && itemMouseLeaveFn(entity)"
|
||||
*cdkVirtualFor="let entity of listingComponent.sortedDisplayedEntities$ | async"
|
||||
[ngClass]="getTableItemClasses(entity)"
|
||||
[routerLink]="routerLinkFn && routerLinkFn(entity)"
|
||||
[routerLink]="entity.routerLink"
|
||||
>
|
||||
<div (click)="listingComponent.toggleEntitySelected($event, entity)" *ngIf="selectionEnabled" class="selection-column">
|
||||
<iqser-round-checkbox [active]="listingComponent.isSelected(entity)"></iqser-round-checkbox>
|
||||
|
||||
@ -57,10 +57,6 @@ export class TableComponent<T extends IListable> implements OnInit {
|
||||
return this._parent;
|
||||
}
|
||||
|
||||
get routerLinkFn(): ((entity: T) => string | string[]) | undefined {
|
||||
return this.listingComponent.routerLinkFn;
|
||||
}
|
||||
|
||||
get tableColumnConfigs(): readonly TableColumnConfig<T>[] {
|
||||
return this.listingComponent.tableColumnConfigs;
|
||||
}
|
||||
@ -82,7 +78,7 @@ export class TableComponent<T extends IListable> implements OnInit {
|
||||
getTableItemClasses(entity: T): { [key: string]: boolean } {
|
||||
const classes: { [key: string]: boolean } = {
|
||||
'table-item': true,
|
||||
pointer: !!this.routerLinkFn && this.routerLinkFn(entity).length > 0
|
||||
pointer: !!entity.routerLink && entity.routerLink.length > 0
|
||||
};
|
||||
for (const key in this.tableItemClasses) {
|
||||
if (Object.prototype.hasOwnProperty.call(this.tableItemClasses, key)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user