@visns-studio/visns-components 2.0.4 → 2.0.6

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.
@@ -324,12 +324,16 @@ const DataGrid = forwardRef(
324
324
  const linkKey = rowProps.columns[columnIndex].link.key;
325
325
  const rowData = rowProps.data[linkKey];
326
326
 
327
- if (column.link.folder) {
327
+ if (column.link.hasOwnProperty('folder')) {
328
328
  const linkFolder =
329
329
  rowProps.columns[columnIndex].link.folder;
330
330
 
331
331
  if (rowProps.data[fileRelationArray[0]]) {
332
- window.location.href = `${linkUrl}${rowData}/${linkFolder}`;
332
+ if (linkFolder !== '') {
333
+ window.location.href = `${linkUrl}${rowData}/${linkFolder}`;
334
+ } else {
335
+ window.location.href = `${linkUrl}${rowData}`;
336
+ }
333
337
  }
334
338
  } else {
335
339
  navigate(`${linkUrl}${rowData}`);
@@ -701,7 +705,7 @@ const DataGrid = forwardRef(
701
705
  if (acc === '') {
702
706
  return data[id];
703
707
  } else {
704
- return acc[id];
708
+ return acc ? acc[id] : '';
705
709
  }
706
710
  }, '');
707
711
 
package/package.json CHANGED
@@ -40,7 +40,7 @@
40
40
  "react-dom": "^17.0.1"
41
41
  },
42
42
  "name": "@visns-studio/visns-components",
43
- "version": "2.0.4",
43
+ "version": "2.0.6",
44
44
  "description": "Various packages to assist in the development of our Custom Applications.",
45
45
  "main": "index.js",
46
46
  "scripts": {