@visns-studio/visns-components 2.4.4 → 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,7 +699,10 @@ const DataGrid = forwardRef(
699
699
  link: column.link ?? {},
700
700
  minWidth: column.minWidth ?? undefined,
701
701
  maxWidth: column.maxWidth ?? undefined,
702
- textVerticalAlign: 'top',
702
+ textVerticalAlign:
703
+ style && style.text_vertical_align
704
+ ? style.text_vertical_align
705
+ : 'center',
703
706
  style: (cellProps) => {
704
707
  const { id, value } = cellProps;
705
708
  let columnStyle = {};
@@ -925,7 +928,7 @@ const DataGrid = forwardRef(
925
928
  const value = moment(
926
929
  data[column.id]
927
930
  ).format(column.format || 'DD-MM-YYYY');
928
- style = {};
931
+ columnStyle = {};
929
932
 
930
933
  if (
931
934
  column.active &&
@@ -938,13 +941,15 @@ const DataGrid = forwardRef(
938
941
  data[column.active.id]
939
942
  ).isBefore(moment())
940
943
  ) {
941
- style = {
944
+ columnStyle = {
942
945
  color: column.active.colour,
943
946
  };
944
947
  }
945
948
  }
946
949
 
947
- return <span style={style}>{value}</span>;
950
+ return (
951
+ <span style={columnStyle}>{value}</span>
952
+ );
948
953
  } else {
949
954
  return null;
950
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.4",
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": {