@visns-studio/visns-components 1.5.8 → 1.5.9
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.
|
@@ -1257,7 +1257,49 @@ const DataGrid = forwardRef(
|
|
|
1257
1257
|
})
|
|
1258
1258
|
.filter((value) => value !== "");
|
|
1259
1259
|
|
|
1260
|
-
|
|
1260
|
+
if (values.length > 0) {
|
|
1261
|
+
let result = "";
|
|
1262
|
+
|
|
1263
|
+
if (
|
|
1264
|
+
column.relation?.id &&
|
|
1265
|
+
column.relation?.key
|
|
1266
|
+
) {
|
|
1267
|
+
const relationValue =
|
|
1268
|
+
column.relation.key.reduce(
|
|
1269
|
+
(acc, id) =>
|
|
1270
|
+
acc === ""
|
|
1271
|
+
? data[id]
|
|
1272
|
+
: acc && acc[id]
|
|
1273
|
+
? acc[id]
|
|
1274
|
+
: "",
|
|
1275
|
+
""
|
|
1276
|
+
);
|
|
1277
|
+
|
|
1278
|
+
result = `${
|
|
1279
|
+
relationValue[
|
|
1280
|
+
column.relation.id
|
|
1281
|
+
]
|
|
1282
|
+
}<br />`;
|
|
1283
|
+
}
|
|
1284
|
+
|
|
1285
|
+
if (
|
|
1286
|
+
column.where &&
|
|
1287
|
+
column.where.id &&
|
|
1288
|
+
column.where.value
|
|
1289
|
+
) {
|
|
1290
|
+
if (
|
|
1291
|
+
data[column.where.id] ===
|
|
1292
|
+
column.where.value
|
|
1293
|
+
) {
|
|
1294
|
+
result += values.join("<br />");
|
|
1295
|
+
}
|
|
1296
|
+
} else {
|
|
1297
|
+
result += values.join("<br />");
|
|
1298
|
+
}
|
|
1299
|
+
|
|
1300
|
+
return <span>{parse(result)}</span>;
|
|
1301
|
+
}
|
|
1302
|
+
} else {
|
|
1261
1303
|
let result = "";
|
|
1262
1304
|
|
|
1263
1305
|
if (
|
|
@@ -1275,28 +1317,11 @@ const DataGrid = forwardRef(
|
|
|
1275
1317
|
""
|
|
1276
1318
|
);
|
|
1277
1319
|
|
|
1278
|
-
result =
|
|
1279
|
-
relationValue[column.relation.id]
|
|
1280
|
-
}<br />`;
|
|
1281
|
-
}
|
|
1282
|
-
|
|
1283
|
-
if (
|
|
1284
|
-
column.where &&
|
|
1285
|
-
column.where.id &&
|
|
1286
|
-
column.where.value
|
|
1287
|
-
) {
|
|
1288
|
-
if (
|
|
1289
|
-
data[column.where.id] ===
|
|
1290
|
-
column.where.value
|
|
1291
|
-
) {
|
|
1292
|
-
result += values.join("<br />");
|
|
1293
|
-
}
|
|
1294
|
-
} else {
|
|
1295
|
-
result += values.join("<br />");
|
|
1320
|
+
result =
|
|
1321
|
+
relationValue[column.relation.id];
|
|
1296
1322
|
}
|
|
1297
1323
|
|
|
1298
1324
|
return <span>{parse(result)}</span>;
|
|
1299
|
-
// }
|
|
1300
1325
|
}
|
|
1301
1326
|
|
|
1302
1327
|
return null;
|
package/package.json
CHANGED
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"react-dom": "^17.0.1"
|
|
36
36
|
},
|
|
37
37
|
"name": "@visns-studio/visns-components",
|
|
38
|
-
"version": "1.5.
|
|
38
|
+
"version": "1.5.9",
|
|
39
39
|
"description": "Various packages to assist in the development of our Custom Applications.",
|
|
40
40
|
"main": "index.js",
|
|
41
41
|
"devDependencies": {},
|