tableActionTpl: TemplateRef<any>;
@ViewChild('editingTpl', { static: true })
editingTpl: TemplateRef<any>;
+ @ViewChild('redirectTpl', { static: true })
+ redirectTpl: TemplateRef<any>;
@ContentChild(TableDetailDirective) rowDetail!: TableDetailDirective;
@ContentChild(TableActionsComponent) tableActions!: TableActionsComponent;
this.cellTemplates.tooltip = this.tooltipTpl;
this.cellTemplates.copy = this.copyTpl;
this.cellTemplates.editing = this.editingTpl;
+ this.cellTemplates.redirect = this.redirectTpl;
}
useCustomClass(value: any): string {
Also need to pass forceIdentifer=true and also a unique identifier prop like
identifier="uid" to the table in some cases to avoid issues.
*/
- editing = 'editing'
+ editing = 'editing',
+ /*
+ This template let's you provide a redirect url and let you redirect from when you click
+ on the cell item. The redirect link can be provided in the customTemplateConfig
+ // {
+ // ...
+ // cellTransformation: CellTemplate.redirect,
+ // customTemplateConfig: {
+ // redirectLink: ['dashboard', 'overview'],
+ // }
+ // ...
+ // }
+ */
+ redirect = 'redirect'
}