@visns-studio/visns-components 4.6.9 → 4.6.10

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.
@@ -1837,7 +1837,11 @@ const DataGrid = forwardRef(
1837
1837
  render: ({ data }) => {
1838
1838
  value = column.id.reduce((acc, id) => {
1839
1839
  if (acc === '') {
1840
- return data[id];
1840
+ if (data[id]) {
1841
+ return data[id];
1842
+ } else {
1843
+ return '';
1844
+ }
1841
1845
  } else {
1842
1846
  if (acc && acc[id]) {
1843
1847
  return acc[id];
@@ -1847,16 +1851,23 @@ const DataGrid = forwardRef(
1847
1851
  }
1848
1852
  }, '');
1849
1853
 
1854
+ console.info(value);
1855
+
1850
1856
  if (value) {
1851
1857
  if (Array.isArray(value)) {
1852
- value = value[0];
1858
+ if (value[0]) {
1859
+ value = value[0];
1860
+ }
1853
1861
  }
1854
1862
 
1855
1863
  if (
1856
1864
  Array.isArray(column.nameFrom)
1857
1865
  ) {
1858
1866
  value = column.nameFrom
1859
- .map((nf) => value[nf])
1867
+ .map(
1868
+ (nf) =>
1869
+ value?.[nf] ?? ''
1870
+ )
1860
1871
  .join(' ');
1861
1872
  } else {
1862
1873
  if (
@@ -1895,7 +1906,11 @@ const DataGrid = forwardRef(
1895
1906
  }
1896
1907
  }
1897
1908
 
1898
- return <span>{value}</span>;
1909
+ if (typeof value === 'string') {
1910
+ return <span>{value}</span>;
1911
+ } else {
1912
+ return null;
1913
+ }
1899
1914
  }
1900
1915
  } else {
1901
1916
  return null;
package/package.json CHANGED
@@ -59,7 +59,7 @@
59
59
  "react-dom": "^17.0.1"
60
60
  },
61
61
  "name": "@visns-studio/visns-components",
62
- "version": "4.6.9",
62
+ "version": "4.6.10",
63
63
  "description": "Various packages to assist in the development of our Custom Applications.",
64
64
  "main": "index.js",
65
65
  "scripts": {