@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.
- package/components/crm/DataGrid.jsx +24 -3
- package/package.json +1 -1
|
@@ -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
|
-
|
|
696
|
-
|
|
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