bc-primeng-ui 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3635,7 +3635,8 @@ class TableFormattingService {
3635
3635
  // return "";
3636
3636
  // }
3637
3637
  formatCell(item, column, countryCustom) {
3638
- const raw = item[column.field];
3638
+ const field = column.field;
3639
+ const raw = field.split('.').reduce((current, key) => current?.[key], item);
3639
3640
  if (raw == null)
3640
3641
  return '';
3641
3642
  let formatted;
@@ -3945,12 +3946,7 @@ class BCGenericPTableComponent {
3945
3946
  }
3946
3947
  getFormattedValue(item, column) {
3947
3948
  try {
3948
- const field = column.field;
3949
- const value = field.split('.').reduce((current, key) => current?.[key], item);
3950
- if (value == null) {
3951
- return '';
3952
- }
3953
- return String(value);
3949
+ return this.formattingService.formatCell(item, column, this.countryCustom);
3954
3950
  }
3955
3951
  catch (error) {
3956
3952
  console.error('Erro retornado pelo serviço de formatação:', error);