@evoke-platform/ui-components 1.5.0-testing.18 → 1.5.0-testing.19
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.
@@ -136,6 +136,14 @@ export class FormFieldComponent extends ReactComponent {
|
|
136
136
|
}
|
137
137
|
}
|
138
138
|
};
|
139
|
+
if (component.type === 'Boolean' && typeof component.initialValue === 'boolean') {
|
140
|
+
// For Boolean components, FormIO treats false values as null/undefined
|
141
|
+
// We need to explicitly set the default value to ensure the correct Boolean state is preserved
|
142
|
+
const defaultValue = component.defaultValue === null || component.defaultValue === undefined
|
143
|
+
? component.initialValue
|
144
|
+
: component.defaultValue;
|
145
|
+
this.setValue(defaultValue);
|
146
|
+
}
|
139
147
|
this.errorDetails = {};
|
140
148
|
this.handleChange = this.handleChange.bind(this);
|
141
149
|
}
|