@visns-studio/visns-components 4.8.7 → 4.8.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
@@ -75,7 +75,7 @@
75
75
  "react-dom": "^17.0.0 || ^18.0.0"
76
76
  },
77
77
  "name": "@visns-studio/visns-components",
78
- "version": "4.8.7",
78
+ "version": "4.8.9",
79
79
  "description": "Various packages to assist in the development of our Custom Applications.",
80
80
  "main": "src/index.js",
81
81
  "files": [
@@ -899,19 +899,20 @@ const DataGrid = forwardRef(
899
899
  };
900
900
 
901
901
  const renderRowContextMenu = useCallback(
902
- (menuProps, { rowProps }) => {
903
- if (form && form.newTabUrl && form.newTabUrl !== '') {
902
+ (menuProps, { rowProps, cellProps }) => {
903
+ const linkUrl = cellProps?.link?.url;
904
+ if (linkUrl) {
904
905
  menuProps.autoDismiss = true;
905
906
  menuProps.items = [
906
907
  {
907
908
  label: 'Open Link in a New Tab',
908
- onClick: () => {
909
+ onClick: () =>
909
910
  window.open(
910
- `${form.newTabUrl}${
911
+ `${linkUrl}/${
911
912
  rowProps.data[form.primaryKey]
912
- }`
913
- );
914
- },
913
+ }`,
914
+ '_blank'
915
+ ),
915
916
  },
916
917
  ];
917
918
  }