@etsoo/materialui 1.5.1 → 1.5.2
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.
|
@@ -40,6 +40,9 @@ function GridDataFormat(data, type, renderProps) {
|
|
|
40
40
|
else
|
|
41
41
|
return shared_1.NumberUtils.format(data, renderProps?.culture, renderProps?.numberFormatOptions);
|
|
42
42
|
}
|
|
43
|
+
// Array
|
|
44
|
+
if (Array.isArray(data))
|
|
45
|
+
return data.join(", ");
|
|
43
46
|
if (typeof data === "string")
|
|
44
47
|
return data;
|
|
45
48
|
return `${data}`;
|
package/lib/cjs/ViewContainer.js
CHANGED
|
@@ -21,6 +21,8 @@ function formatItemData(app, fieldData) {
|
|
|
21
21
|
return fieldData;
|
|
22
22
|
if (fieldData instanceof Date)
|
|
23
23
|
return app.formatDate(fieldData, "d");
|
|
24
|
+
if (Array.isArray(fieldData))
|
|
25
|
+
return fieldData.join(", ");
|
|
24
26
|
return `${fieldData}`;
|
|
25
27
|
}
|
|
26
28
|
function getResp(singleRow) {
|
|
@@ -37,6 +37,9 @@ export function GridDataFormat(data, type, renderProps) {
|
|
|
37
37
|
else
|
|
38
38
|
return NumberUtils.format(data, renderProps?.culture, renderProps?.numberFormatOptions);
|
|
39
39
|
}
|
|
40
|
+
// Array
|
|
41
|
+
if (Array.isArray(data))
|
|
42
|
+
return data.join(", ");
|
|
40
43
|
if (typeof data === "string")
|
|
41
44
|
return data;
|
|
42
45
|
return `${data}`;
|
package/lib/mjs/ViewContainer.js
CHANGED
|
@@ -13,6 +13,8 @@ function formatItemData(app, fieldData) {
|
|
|
13
13
|
return fieldData;
|
|
14
14
|
if (fieldData instanceof Date)
|
|
15
15
|
return app.formatDate(fieldData, "d");
|
|
16
|
+
if (Array.isArray(fieldData))
|
|
17
|
+
return fieldData.join(", ");
|
|
16
18
|
return `${fieldData}`;
|
|
17
19
|
}
|
|
18
20
|
function getResp(singleRow) {
|
package/package.json
CHANGED
package/src/GridDataFormat.tsx
CHANGED
package/src/ViewContainer.tsx
CHANGED
|
@@ -14,6 +14,7 @@ function formatItemData(
|
|
|
14
14
|
if (fieldData == null) return undefined;
|
|
15
15
|
if (typeof fieldData === "string") return fieldData;
|
|
16
16
|
if (fieldData instanceof Date) return app.formatDate(fieldData, "d");
|
|
17
|
+
if (Array.isArray(fieldData)) return fieldData.join(", ");
|
|
17
18
|
return `${fieldData}`;
|
|
18
19
|
}
|
|
19
20
|
|