@visns-studio/visns-components 2.4.5 → 2.4.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.
@@ -690,7 +690,7 @@ const DataGrid = forwardRef(
690
690
  let relationName;
691
691
  let selectedDataSource = null;
692
692
  let stage;
693
- let style;
693
+ let columnStyle;
694
694
  let value;
695
695
 
696
696
  const commonProps = {
@@ -699,9 +699,10 @@ const DataGrid = forwardRef(
699
699
  link: column.link ?? {},
700
700
  minWidth: column.minWidth ?? undefined,
701
701
  maxWidth: column.maxWidth ?? undefined,
702
- textVerticalAlign: style.text_vertical_align
703
- ? style.text_vertical_align
704
- : 'center',
702
+ textVerticalAlign:
703
+ style && style.text_vertical_align
704
+ ? style.text_vertical_align
705
+ : 'center',
705
706
  style: (cellProps) => {
706
707
  const { id, value } = cellProps;
707
708
  let columnStyle = {};
@@ -927,7 +928,7 @@ const DataGrid = forwardRef(
927
928
  const value = moment(
928
929
  data[column.id]
929
930
  ).format(column.format || 'DD-MM-YYYY');
930
- style = {};
931
+ columnStyle = {};
931
932
 
932
933
  if (
933
934
  column.active &&
@@ -940,13 +941,15 @@ const DataGrid = forwardRef(
940
941
  data[column.active.id]
941
942
  ).isBefore(moment())
942
943
  ) {
943
- style = {
944
+ columnStyle = {
944
945
  color: column.active.colour,
945
946
  };
946
947
  }
947
948
  }
948
949
 
949
- return <span style={style}>{value}</span>;
950
+ return (
951
+ <span style={columnStyle}>{value}</span>
952
+ );
950
953
  } else {
951
954
  return null;
952
955
  }
package/package.json CHANGED
@@ -42,7 +42,7 @@
42
42
  "react-dom": "^17.0.1"
43
43
  },
44
44
  "name": "@visns-studio/visns-components",
45
- "version": "2.4.5",
45
+ "version": "2.4.6",
46
46
  "description": "Various packages to assist in the development of our Custom Applications.",
47
47
  "main": "index.js",
48
48
  "scripts": {