@visns-studio/visns-components 5.5.8 → 5.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.
package/package.json
CHANGED
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"react-dom": "^17.0.0 || ^18.0.0"
|
|
83
83
|
},
|
|
84
84
|
"name": "@visns-studio/visns-components",
|
|
85
|
-
"version": "5.5.
|
|
85
|
+
"version": "5.5.9",
|
|
86
86
|
"description": "Various packages to assist in the development of our Custom Applications.",
|
|
87
87
|
"main": "src/index.js",
|
|
88
88
|
"files": [
|
|
@@ -1563,14 +1563,17 @@ const DataGrid = forwardRef(
|
|
|
1563
1563
|
500
|
|
1564
1564
|
);
|
|
1565
1565
|
|
|
1566
|
-
const getDropdownData = async (ids, url, fields) => {
|
|
1566
|
+
const getDropdownData = async (ids, url, fields, where) => {
|
|
1567
1567
|
// Concatenate id array into a single string if it's an array
|
|
1568
1568
|
const uniqueId = Array.isArray(ids) ? ids.join('') : ids;
|
|
1569
1569
|
|
|
1570
1570
|
// Return a promise that includes the concatenated uniqueId in the resolution
|
|
1571
1571
|
return new Promise(async (resolve, reject) => {
|
|
1572
1572
|
try {
|
|
1573
|
-
const res = await CustomFetch(url, 'POST', {
|
|
1573
|
+
const res = await CustomFetch(url, 'POST', {
|
|
1574
|
+
fields,
|
|
1575
|
+
where,
|
|
1576
|
+
});
|
|
1574
1577
|
resolve({ [uniqueId]: res.data.data }); // Correctly use uniqueId as the key
|
|
1575
1578
|
} catch (err) {
|
|
1576
1579
|
console.error(err);
|
|
@@ -1583,7 +1586,12 @@ const DataGrid = forwardRef(
|
|
|
1583
1586
|
const dropdownFetches = columns
|
|
1584
1587
|
.filter((column) => column.type === 'dropdown')
|
|
1585
1588
|
.map((column) =>
|
|
1586
|
-
getDropdownData(
|
|
1589
|
+
getDropdownData(
|
|
1590
|
+
column.id,
|
|
1591
|
+
column.url,
|
|
1592
|
+
column.fields,
|
|
1593
|
+
column.where
|
|
1594
|
+
)
|
|
1587
1595
|
);
|
|
1588
1596
|
|
|
1589
1597
|
Promise.all(dropdownFetches)
|