@visns-studio/visns-components 4.10.47 → 4.10.48
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/package.json
CHANGED
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"react-dom": "^17.0.0 || ^18.0.0"
|
|
78
78
|
},
|
|
79
79
|
"name": "@visns-studio/visns-components",
|
|
80
|
-
"version": "4.10.
|
|
80
|
+
"version": "4.10.48",
|
|
81
81
|
"description": "Various packages to assist in the development of our Custom Applications.",
|
|
82
82
|
"main": "src/index.js",
|
|
83
83
|
"files": [
|
|
@@ -2064,6 +2064,38 @@ const DataGrid = forwardRef(
|
|
|
2064
2064
|
}, '');
|
|
2065
2065
|
|
|
2066
2066
|
if (value) {
|
|
2067
|
+
let columnStyle = {};
|
|
2068
|
+
let columnValueChecker = '';
|
|
2069
|
+
|
|
2070
|
+
if (
|
|
2071
|
+
column?.active?.id &&
|
|
2072
|
+
column?.active?.value
|
|
2073
|
+
) {
|
|
2074
|
+
if (
|
|
2075
|
+
data[column.active.id]
|
|
2076
|
+
?.value
|
|
2077
|
+
) {
|
|
2078
|
+
columnValueChecker =
|
|
2079
|
+
data[column.active.id]
|
|
2080
|
+
?.value;
|
|
2081
|
+
} else if (
|
|
2082
|
+
data[column.active.id]
|
|
2083
|
+
) {
|
|
2084
|
+
columnValueChecker =
|
|
2085
|
+
data[column.active.id];
|
|
2086
|
+
}
|
|
2087
|
+
|
|
2088
|
+
if (
|
|
2089
|
+
columnValueChecker ===
|
|
2090
|
+
column.active.value
|
|
2091
|
+
) {
|
|
2092
|
+
columnStyle = {
|
|
2093
|
+
color: column.active
|
|
2094
|
+
.colour,
|
|
2095
|
+
};
|
|
2096
|
+
}
|
|
2097
|
+
}
|
|
2098
|
+
|
|
2067
2099
|
if (Array.isArray(value)) {
|
|
2068
2100
|
if (value[0]) {
|
|
2069
2101
|
value = value[0];
|
|
@@ -2096,7 +2128,7 @@ const DataGrid = forwardRef(
|
|
|
2096
2128
|
column.placeholder !== ''
|
|
2097
2129
|
) {
|
|
2098
2130
|
return (
|
|
2099
|
-
<span>
|
|
2131
|
+
<span style={columnStyle}>
|
|
2100
2132
|
{column.placeholder}
|
|
2101
2133
|
</span>
|
|
2102
2134
|
);
|
|
@@ -2117,7 +2149,13 @@ const DataGrid = forwardRef(
|
|
|
2117
2149
|
}
|
|
2118
2150
|
|
|
2119
2151
|
if (typeof value === 'string') {
|
|
2120
|
-
return
|
|
2152
|
+
return (
|
|
2153
|
+
<span
|
|
2154
|
+
style={columnStyle}
|
|
2155
|
+
>
|
|
2156
|
+
{value}
|
|
2157
|
+
</span>
|
|
2158
|
+
);
|
|
2121
2159
|
} else {
|
|
2122
2160
|
return null;
|
|
2123
2161
|
}
|
|
@@ -218,11 +218,14 @@ function Form({
|
|
|
218
218
|
updateFormData({ [id]: inputValue });
|
|
219
219
|
|
|
220
220
|
// Update any matching form data properties
|
|
221
|
-
Object.keys(inputValue)
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
221
|
+
Object.keys(inputValue)
|
|
222
|
+
.filter(
|
|
223
|
+
(key) =>
|
|
224
|
+
formData.hasOwnProperty(key) &&
|
|
225
|
+
key !== 'id' &&
|
|
226
|
+
key !== 'label'
|
|
227
|
+
)
|
|
228
|
+
.forEach((key) => updateFormData({ [key]: inputValue[key] }));
|
|
226
229
|
|
|
227
230
|
formSettings.fields.forEach((field) => {
|
|
228
231
|
if (field.id === id && field.trigger) {
|