Commit c5459fe9e534706d05f7b8cb5a3727c2c15bc69d

Authored by Chantsova Ekaterina
1 parent 45e49144

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,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);