@visns-studio/visns-components 2.2.5 → 2.2.7

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.
@@ -691,9 +691,30 @@ const DataGrid = forwardRef(
691
691
  minWidth: column.minWidth ?? undefined,
692
692
  maxWidth: column.maxWidth ?? undefined,
693
693
  textVerticalAlign: 'top',
694
- style: {
695
- ...(column.style ?? {}),
696
- margin: '0px',
694
+ style: (cellProps) => {
695
+ const { id, value } = cellProps;
696
+ let columnStyle = {};
697
+
698
+ console.info(value, id);
699
+
700
+ if (
701
+ column.styleCondition &&
702
+ column.styleCondition.key
703
+ ) {
704
+ if (value) {
705
+ columnStyle = {
706
+ ...(column.style ?? {}),
707
+ margin: '0px',
708
+ };
709
+ }
710
+ } else {
711
+ columnStyle = {
712
+ ...(column.style ?? {}),
713
+ margin: '0px',
714
+ };
715
+ }
716
+
717
+ return columnStyle;
697
718
  },
698
719
  };
699
720
 
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.2.5",
43
+ "version": "2.2.7",
44
44
  "description": "Various packages to assist in the development of our Custom Applications.",
45
45
  "main": "index.js",
46
46
  "scripts": {