ms-data-grid 0.0.124 → 0.0.125
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.
|
@@ -3988,6 +3988,23 @@ class DataGridComponent {
|
|
|
3988
3988
|
const dateObj = keyValue instanceof Date ? keyValue : new Date(keyValue);
|
|
3989
3989
|
groupKey = this.commonSevice.formatDateValue(dateObj, this.dateFormat || 'dd/MM/yyyy');
|
|
3990
3990
|
}
|
|
3991
|
+
// Handle objects (like {id, name, value})
|
|
3992
|
+
else if (typeof keyValue === 'object' && keyValue !== null && !Array.isArray(keyValue)) {
|
|
3993
|
+
// Try common property names for objects
|
|
3994
|
+
groupKey = keyValue.value ??
|
|
3995
|
+
keyValue.name ??
|
|
3996
|
+
keyValue.id ??
|
|
3997
|
+
keyValue.label ??
|
|
3998
|
+
keyValue[Object.keys(keyValue)[0]] ??
|
|
3999
|
+
"_Blank";
|
|
4000
|
+
// If it's still an object after extraction, convert to string
|
|
4001
|
+
if (typeof groupKey === 'object') {
|
|
4002
|
+
groupKey = "_Blank";
|
|
4003
|
+
}
|
|
4004
|
+
else {
|
|
4005
|
+
groupKey = this.toTitleCase(String(groupKey).trim());
|
|
4006
|
+
}
|
|
4007
|
+
}
|
|
3991
4008
|
else {
|
|
3992
4009
|
groupKey = keyValue ? this.toTitleCase(String(keyValue).trim()) : "_Blank";
|
|
3993
4010
|
}
|