Commit 39e23130e8363e7e2fcc9b28cd91d13fc5bad0a3

Authored by Igor Kulikov
Committed by GitHub
2 parents 7565afca c5459fe9

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
... ... @@ -352,7 +352,8 @@ export class EntitiesTableWidgetComponent extends PageComponent implements OnIni
352 352 }
353 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 357 dataKey.def = 'def' + this.columns.length;
357 358 const keySettings: TableWidgetDataKeySettings = dataKey.settings;
358 359 if (dataKey.type === DataKeyType.entityField &&
... ... @@ -374,7 +375,7 @@ export class EntitiesTableWidgetComponent extends PageComponent implements OnIni
374 375 }
375 376
376 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 381 this.pageLink.sortOrder = entityDataSortOrderFromString(this.defaultSortOrder, this.columns);
... ...