@visns-studio/visns-components 1.5.9 → 1.5.11
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.
|
@@ -1199,7 +1199,8 @@ const DataGrid = forwardRef(
|
|
|
1199
1199
|
|
|
1200
1200
|
if (
|
|
1201
1201
|
relationValue &&
|
|
1202
|
-
Array.isArray(relationValue)
|
|
1202
|
+
Array.isArray(relationValue) &&
|
|
1203
|
+
relationValue.length > 0
|
|
1203
1204
|
) {
|
|
1204
1205
|
const nameProperties = Array.isArray(
|
|
1205
1206
|
column.nameFrom
|
|
@@ -1257,48 +1258,46 @@ const DataGrid = forwardRef(
|
|
|
1257
1258
|
})
|
|
1258
1259
|
.filter((value) => value !== "");
|
|
1259
1260
|
|
|
1260
|
-
if (values.length > 0) {
|
|
1261
|
-
|
|
1261
|
+
// if (values.length > 0) {
|
|
1262
|
+
let result = "";
|
|
1262
1263
|
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1264
|
+
if (
|
|
1265
|
+
column.relation?.id &&
|
|
1266
|
+
column.relation?.key
|
|
1267
|
+
) {
|
|
1268
|
+
const relationValue =
|
|
1269
|
+
column.relation.key.reduce(
|
|
1270
|
+
(acc, id) =>
|
|
1271
|
+
acc === ""
|
|
1272
|
+
? data[id]
|
|
1273
|
+
: acc && acc[id]
|
|
1274
|
+
? acc[id]
|
|
1275
|
+
: "",
|
|
1276
|
+
""
|
|
1277
|
+
);
|
|
1277
1278
|
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
}<br />`;
|
|
1283
|
-
}
|
|
1279
|
+
result = `${
|
|
1280
|
+
relationValue[column.relation.id]
|
|
1281
|
+
}<br />`;
|
|
1282
|
+
}
|
|
1284
1283
|
|
|
1284
|
+
if (
|
|
1285
|
+
column.where &&
|
|
1286
|
+
column.where.id &&
|
|
1287
|
+
column.where.value
|
|
1288
|
+
) {
|
|
1285
1289
|
if (
|
|
1286
|
-
column.where
|
|
1287
|
-
column.where.id &&
|
|
1290
|
+
data[column.where.id] ===
|
|
1288
1291
|
column.where.value
|
|
1289
1292
|
) {
|
|
1290
|
-
if (
|
|
1291
|
-
data[column.where.id] ===
|
|
1292
|
-
column.where.value
|
|
1293
|
-
) {
|
|
1294
|
-
result += values.join("<br />");
|
|
1295
|
-
}
|
|
1296
|
-
} else {
|
|
1297
1293
|
result += values.join("<br />");
|
|
1298
1294
|
}
|
|
1299
|
-
|
|
1300
|
-
|
|
1295
|
+
} else {
|
|
1296
|
+
result += values.join("<br />");
|
|
1301
1297
|
}
|
|
1298
|
+
|
|
1299
|
+
return <span>{parse(result)}</span>;
|
|
1300
|
+
// }
|
|
1302
1301
|
} else {
|
|
1303
1302
|
let result = "";
|
|
1304
1303
|
|
|
@@ -1318,7 +1317,12 @@ const DataGrid = forwardRef(
|
|
|
1318
1317
|
);
|
|
1319
1318
|
|
|
1320
1319
|
result =
|
|
1321
|
-
relationValue
|
|
1320
|
+
relationValue &&
|
|
1321
|
+
relationValue[column.relation.id]
|
|
1322
|
+
? relationValue[
|
|
1323
|
+
column.relation.id
|
|
1324
|
+
]
|
|
1325
|
+
: "";
|
|
1322
1326
|
}
|
|
1323
1327
|
|
|
1324
1328
|
return <span>{parse(result)}</span>;
|
|
@@ -12,7 +12,7 @@ function Select(props) {
|
|
|
12
12
|
value={inputValue}
|
|
13
13
|
data-show={settings.show ? JSON.stringify(settings.show) : ""}
|
|
14
14
|
>
|
|
15
|
-
<option>Please select an option</option>
|
|
15
|
+
<option value="">Please select an option</option>
|
|
16
16
|
{options.map((item, index) => (
|
|
17
17
|
<option
|
|
18
18
|
key={settings.id + "-" + item.id}
|
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.11",
|
|
39
39
|
"description": "Various packages to assist in the development of our Custom Applications.",
|
|
40
40
|
"main": "index.js",
|
|
41
41
|
"devDependencies": {},
|