@visns-studio/visns-components 2.2.6 → 2.2.8

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