import { CdUserConfig } from '~/app/shared/models/cd-user-config';
import { TimerService } from '~/app/shared/services/timer.service';
+const TABLE_LIST_LIMIT = 10;
@Component({
selector: 'cd-table',
templateUrl: './table.component.html',
rowDetailsTpl: TemplateRef<any>;
@ViewChild('rowSelectionTpl', { static: true })
rowSelectionTpl: TemplateRef<any>;
+ @ViewChild('pathTpl', { static: true })
+ pathTpl: TemplateRef<any>;
// This is the array with the items to be shown.
@Input()
footer? = true;
// Page size to show. Set to 0 to show unlimited number of rows.
@Input()
- limit? = 10;
+ limit? = TABLE_LIST_LIMIT;
@Input()
maxLimit? = 9999;
// Has the row details?
this._loadUserConfig();
this._initUserConfigAutoSave();
}
- if (!this.userConfig.limit) {
+ if (this.limit !== TABLE_LIST_LIMIT || !this.userConfig.limit) {
this.userConfig.limit = this.limit;
}
if (!(this.userConfig.offset >= 0)) {
this.cellTemplates.map = this.mapTpl;
this.cellTemplates.truncate = this.truncateTpl;
this.cellTemplates.timeAgo = this.timeAgoTpl;
+ this.cellTemplates.path = this.pathTpl;
}
useCustomClass(value: any): string {