resolved warning; checking tabulator init before calling getLang in custom module

This commit is contained in:
adisposkofh
2026-07-27 16:08:17 +02:00
parent 89ea4187fa
commit 2fa8fd1703
2 changed files with 7 additions and 4 deletions
@@ -176,7 +176,6 @@ export const Profil = {
this.data = data.profil_data.data;
this.calendarSyncUrls = data.calendar_sync_urls ?? [];
this.authPermissions = data.permissions;
console.log(data.profil_data);
},
zustellAdressenCount() {
if (!this.data || !this.data.adressen) {
@@ -9,9 +9,13 @@ export default class ResponsiveLayoutExtensionModule extends ResponsiveLayout {
}
generateCollapsedRowData(row) {
let result = super.generateCollapsedRowData(row)
const isLocalizationEnabled = this.table.options.locale && this.table.options.locale !== "default";
const columnHeadingTranslations = this.table?.getLang()?.columns;
let result = super.generateCollapsedRowData(row);
const isLocalizationEnabled =
this.table.options.locale &&
this.table.options.locale !== "default";
const columnHeadingTranslations = this.table?.initialized
? this.table.getLang()?.columns
: null;
if (isLocalizationEnabled && columnHeadingTranslations) {
result = result.map((column) => {