spiderly 19.11.4 → 19.11.6
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.
- package/fesm2022/spiderly.mjs +15 -2
- package/fesm2022/spiderly.mjs.map +1 -1
- package/package.json +1 -1
package/fesm2022/spiderly.mjs
CHANGED
|
@@ -4686,8 +4686,21 @@ class SpiderlyDataTableComponent {
|
|
|
4686
4686
|
const raw = rowData[col.field];
|
|
4687
4687
|
const local = typeof raw === 'string' ? parseDateOnlyLocal(raw) : null;
|
|
4688
4688
|
return formatDate(local ?? raw, 'shortDate', this.locale);
|
|
4689
|
-
case 'multiselect':
|
|
4690
|
-
|
|
4689
|
+
case 'multiselect': {
|
|
4690
|
+
// Translate through the column's own option list — the same list its filter dropdown
|
|
4691
|
+
// already renders labels from. Without this the cell shows the stored value, so an enum
|
|
4692
|
+
// column reads `1` while its filter offers "Info", and an FK column reads the id.
|
|
4693
|
+
//
|
|
4694
|
+
// Match on `code`, not `value`: that is the property PrimengOption carries (see the note
|
|
4695
|
+
// on the class). The raw value is the fallback rather than an empty cell, because the
|
|
4696
|
+
// options are usually filled asynchronously after the first paint — blanking the column
|
|
4697
|
+
// until they land would be a worse regression than the number this replaces.
|
|
4698
|
+
const multiselectValue = rowData[col.field];
|
|
4699
|
+
if (multiselectValue == null)
|
|
4700
|
+
return null;
|
|
4701
|
+
const option = col.dropdownOrMultiselectValues?.find((x) => x.code === multiselectValue);
|
|
4702
|
+
return option?.label ?? multiselectValue;
|
|
4703
|
+
}
|
|
4691
4704
|
case 'boolean':
|
|
4692
4705
|
return rowData[col.field] == true
|
|
4693
4706
|
? this.translocoService.translate('Yes')
|