Commit 39e23130e8363e7e2fcc9b28cd91d13fc5bad0a3
Committed by
GitHub
Merge pull request #3583 from ChantsovaEkaterina/bug/entity-table-data-dispaying…
…-failed-when-using-custom-translation Entities table: fix data displaying and sorting, when labels with custom translations are used
Showing
1 changed file
with
3 additions
and
2 deletions
@@ -352,7 +352,8 @@ export class EntitiesTableWidgetComponent extends PageComponent implements OnIni | @@ -352,7 +352,8 @@ export class EntitiesTableWidgetComponent extends PageComponent implements OnIni | ||
352 | } | 352 | } |
353 | dataKeys.push(dataKey); | 353 | dataKeys.push(dataKey); |
354 | 354 | ||
355 | - dataKey.title = this.utils.customTranslation(dataKey.label, dataKey.label); | 355 | + dataKey.label = this.utils.customTranslation(dataKey.label, dataKey.label); |
356 | + dataKey.title = dataKey.label; | ||
356 | dataKey.def = 'def' + this.columns.length; | 357 | dataKey.def = 'def' + this.columns.length; |
357 | const keySettings: TableWidgetDataKeySettings = dataKey.settings; | 358 | const keySettings: TableWidgetDataKeySettings = dataKey.settings; |
358 | if (dataKey.type === DataKeyType.entityField && | 359 | if (dataKey.type === DataKeyType.entityField && |
@@ -374,7 +375,7 @@ export class EntitiesTableWidgetComponent extends PageComponent implements OnIni | @@ -374,7 +375,7 @@ export class EntitiesTableWidgetComponent extends PageComponent implements OnIni | ||
374 | } | 375 | } |
375 | 376 | ||
376 | if (this.settings.defaultSortOrder && this.settings.defaultSortOrder.length) { | 377 | if (this.settings.defaultSortOrder && this.settings.defaultSortOrder.length) { |
377 | - this.defaultSortOrder = this.settings.defaultSortOrder; | 378 | + this.defaultSortOrder = this.utils.customTranslation(this.settings.defaultSortOrder, this.settings.defaultSortOrder); |
378 | } | 379 | } |
379 | 380 | ||
380 | this.pageLink.sortOrder = entityDataSortOrderFromString(this.defaultSortOrder, this.columns); | 381 | this.pageLink.sortOrder = entityDataSortOrderFromString(this.defaultSortOrder, this.columns); |