@visns-studio/visns-components 4.10.29 → 4.10.31

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
@@ -77,7 +77,7 @@
77
77
  "react-dom": "^17.0.0 || ^18.0.0"
78
78
  },
79
79
  "name": "@visns-studio/visns-components",
80
- "version": "4.10.29",
80
+ "version": "4.10.31",
81
81
  "description": "Various packages to assist in the development of our Custom Applications.",
82
82
  "main": "src/index.js",
83
83
  "files": [
@@ -20,6 +20,15 @@ function Breadcrumb({ data, page }) {
20
20
  ? getNestedData(data, page.parentTitleKey)
21
21
  : null;
22
22
 
23
+ // Function to handle titleKey when it's a nested path like 'event_detail.name'
24
+ const getTitleData = (data, titleKey) => {
25
+ if (typeof titleKey === 'string' && titleKey.includes('.')) {
26
+ const keys = titleKey.split('.'); // Split the nested path by "."
27
+ return getNestedData(data, keys); // Use getNestedData to fetch the nested value
28
+ }
29
+ return data[titleKey]; // If not nested, return the direct data
30
+ };
31
+
23
32
  return (
24
33
  <h1>
25
34
  {page?.parentTitle && page?.parentUrl && (
@@ -57,7 +66,7 @@ function Breadcrumb({ data, page }) {
57
66
  // If titleKey is an array, iterate and display each nested value
58
67
  page.titleKey.map((key, index) => (
59
68
  <span key={index}>
60
- {data[key]}
69
+ {getTitleData(data, key)}
61
70
  {index < page.titleKey.length - 1 && ' '}
62
71
  </span>
63
72
  ))
@@ -65,10 +74,10 @@ function Breadcrumb({ data, page }) {
65
74
  // If titleKey is a single string, display the corresponding data
66
75
  <>
67
76
  {page.titleType === 'date'
68
- ? moment(data[page.titleKey]).format(
69
- 'DD-MM-YYYY'
70
- )
71
- : data[page.titleKey]}
77
+ ? moment(
78
+ getTitleData(data, page.titleKey)
79
+ ).format('DD-MM-YYYY')
80
+ : getTitleData(data, page.titleKey)}
72
81
  </>
73
82
  )}
74
83
  </>
@@ -1528,17 +1528,13 @@ function Field({
1528
1528
  <tr
1529
1529
  key={`table-radio-row-${settings.id}-${row.id}`}
1530
1530
  >
1531
- <td
1532
- style={{
1533
- whiteSpace: 'nowrap',
1534
- }}
1535
- >
1536
- {row.label}
1537
- </td>
1531
+ <td>{row.label}</td>
1538
1532
  {tableRadioColumns.map((cell, cellKey) => (
1539
1533
  <td
1540
1534
  key={`table-radio-cell-${settings.id}-${row.id}-${cell.id}-${cellKey}-${rowKey}`}
1541
1535
  style={{
1536
+ width: '250px',
1537
+ whiteSpace: 'nowrap',
1542
1538
  textAlign:
1543
1539
  tableRadioColumns[cellKey]
1544
1540
  .type === '' ||