@etsoo/materialui 1.4.89 → 1.4.90
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/lib/cjs/pages/ViewPage.js +10 -5
- package/lib/mjs/pages/ViewPage.js +10 -5
- package/package.json +1 -1
- package/src/pages/ViewPage.tsx +7 -2
|
@@ -88,13 +88,18 @@ function getItemField(app, field, data) {
|
|
|
88
88
|
itemData = (0, GridDataFormat_1.GridDataFormat)(data[fieldData], dataType, renderProps);
|
|
89
89
|
// Field label
|
|
90
90
|
itemLabel =
|
|
91
|
-
|
|
92
|
-
?
|
|
93
|
-
: fieldLabel
|
|
94
|
-
? app.get(
|
|
95
|
-
: fieldLabel
|
|
91
|
+
fieldLabel === ""
|
|
92
|
+
? undefined
|
|
93
|
+
: fieldLabel == null && typeof fieldData === "string"
|
|
94
|
+
? app.get(fieldData) ?? fieldData
|
|
95
|
+
: typeof fieldLabel === "function"
|
|
96
|
+
? fieldLabel(data)
|
|
97
|
+
: fieldLabel != null
|
|
98
|
+
? app.get(fieldLabel) ?? fieldLabel
|
|
99
|
+
: undefined;
|
|
96
100
|
}
|
|
97
101
|
else {
|
|
102
|
+
// Single field format
|
|
98
103
|
itemData = formatItemData(app, data[field]);
|
|
99
104
|
itemLabel = app.get(field) ?? field;
|
|
100
105
|
}
|
|
@@ -81,13 +81,18 @@ function getItemField(app, field, data) {
|
|
|
81
81
|
itemData = GridDataFormat(data[fieldData], dataType, renderProps);
|
|
82
82
|
// Field label
|
|
83
83
|
itemLabel =
|
|
84
|
-
|
|
85
|
-
?
|
|
86
|
-
: fieldLabel
|
|
87
|
-
? app.get(
|
|
88
|
-
: fieldLabel
|
|
84
|
+
fieldLabel === ""
|
|
85
|
+
? undefined
|
|
86
|
+
: fieldLabel == null && typeof fieldData === "string"
|
|
87
|
+
? app.get(fieldData) ?? fieldData
|
|
88
|
+
: typeof fieldLabel === "function"
|
|
89
|
+
? fieldLabel(data)
|
|
90
|
+
: fieldLabel != null
|
|
91
|
+
? app.get(fieldLabel) ?? fieldLabel
|
|
92
|
+
: undefined;
|
|
89
93
|
}
|
|
90
94
|
else {
|
|
95
|
+
// Single field format
|
|
91
96
|
itemData = formatItemData(app, data[field]);
|
|
92
97
|
itemLabel = app.get(field) ?? field;
|
|
93
98
|
}
|
package/package.json
CHANGED
package/src/pages/ViewPage.tsx
CHANGED
|
@@ -236,12 +236,17 @@ function getItemField<T extends object>(
|
|
|
236
236
|
|
|
237
237
|
// Field label
|
|
238
238
|
itemLabel =
|
|
239
|
-
|
|
239
|
+
fieldLabel === ""
|
|
240
|
+
? undefined
|
|
241
|
+
: fieldLabel == null && typeof fieldData === "string"
|
|
242
|
+
? app.get<string>(fieldData) ?? fieldData
|
|
243
|
+
: typeof fieldLabel === "function"
|
|
240
244
|
? fieldLabel(data)
|
|
241
245
|
: fieldLabel != null
|
|
242
246
|
? app.get<string>(fieldLabel) ?? fieldLabel
|
|
243
|
-
:
|
|
247
|
+
: undefined;
|
|
244
248
|
} else {
|
|
249
|
+
// Single field format
|
|
245
250
|
itemData = formatItemData(app, data[field]);
|
|
246
251
|
itemLabel = app.get<string>(field) ?? field;
|
|
247
252
|
}
|