@gravity-ui/dynamic-forms 5.27.0 → 5.27.1
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.
|
@@ -120,10 +120,16 @@ const SchemaRendererNodeComponent = ({ headName, modeOverride, name, schemaOverr
|
|
|
120
120
|
return undefined;
|
|
121
121
|
}
|
|
122
122
|
const coercedCurrentValue = (0, utils_2.coerceToJsonSchemaType)(currentValue, schema === null || schema === void 0 ? void 0 : schema.type);
|
|
123
|
-
if (coercedCurrentValue !== undefined
|
|
123
|
+
if (coercedCurrentValue !== undefined) {
|
|
124
|
+
if (coercedCurrentValue === currentValue) {
|
|
125
|
+
return undefined;
|
|
126
|
+
}
|
|
124
127
|
return { name, value: coercedCurrentValue };
|
|
125
128
|
}
|
|
126
|
-
if (defaultValue !== undefined
|
|
129
|
+
if (defaultValue !== undefined) {
|
|
130
|
+
if (defaultValue === currentValue) {
|
|
131
|
+
return undefined;
|
|
132
|
+
}
|
|
127
133
|
return { name, value: defaultValue };
|
|
128
134
|
}
|
|
129
135
|
return undefined;
|
|
@@ -116,10 +116,16 @@ const SchemaRendererNodeComponent = ({ headName, modeOverride, name, schemaOverr
|
|
|
116
116
|
return undefined;
|
|
117
117
|
}
|
|
118
118
|
const coercedCurrentValue = coerceToJsonSchemaType(currentValue, schema === null || schema === void 0 ? void 0 : schema.type);
|
|
119
|
-
if (coercedCurrentValue !== undefined
|
|
119
|
+
if (coercedCurrentValue !== undefined) {
|
|
120
|
+
if (coercedCurrentValue === currentValue) {
|
|
121
|
+
return undefined;
|
|
122
|
+
}
|
|
120
123
|
return { name, value: coercedCurrentValue };
|
|
121
124
|
}
|
|
122
|
-
if (defaultValue !== undefined
|
|
125
|
+
if (defaultValue !== undefined) {
|
|
126
|
+
if (defaultValue === currentValue) {
|
|
127
|
+
return undefined;
|
|
128
|
+
}
|
|
123
129
|
return { name, value: defaultValue };
|
|
124
130
|
}
|
|
125
131
|
return undefined;
|