@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.
- package/components/crm/DataGrid.jsx +10 -7
- package/package.json +1 -1
|
@@ -690,7 +690,7 @@ const DataGrid = forwardRef(
|
|
|
690
690
|
let relationName;
|
|
691
691
|
let selectedDataSource = null;
|
|
692
692
|
let stage;
|
|
693
|
-
let
|
|
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:
|
|
703
|
-
|
|
704
|
-
|
|
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
|
-
|
|
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
|
-
|
|
944
|
+
columnStyle = {
|
|
944
945
|
color: column.active.colour,
|
|
945
946
|
};
|
|
946
947
|
}
|
|
947
948
|
}
|
|
948
949
|
|
|
949
|
-
return
|
|
950
|
+
return (
|
|
951
|
+
<span style={columnStyle}>{value}</span>
|
|
952
|
+
);
|
|
950
953
|
} else {
|
|
951
954
|
return null;
|
|
952
955
|
}
|
package/package.json
CHANGED