@evoke-platform/ui-components 1.4.0-testing.7 → 1.4.0-testing.9
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/dist/published/components/custom/Form/FormComponents/ObjectComponent/ObjectComponent.js
CHANGED
@@ -16,7 +16,7 @@ export class ObjectComponent extends ReactComponent {
|
|
16
16
|
delete this.errorDetails['api-error'];
|
17
17
|
const updatedValue = pick(value, 'id', 'name');
|
18
18
|
// set the value on the form instance at this.root.data
|
19
|
-
this.setValue(!isNil(updatedValue) ? updatedValue : '');
|
19
|
+
this.setValue(!isNil(updatedValue) && !isEmpty(updatedValue) ? updatedValue : '');
|
20
20
|
// update the value in the component instance
|
21
21
|
this.updateValue(!isNil(updatedValue) ? updatedValue : {}, { modified: true });
|
22
22
|
this.handleValidation();
|
@@ -644,6 +644,9 @@ formComponents, allCriteriaInputs, instance, objectPropertyInputProps, associate
|
|
644
644
|
associatedObject?.propertyId === property.id) {
|
645
645
|
defaultValue = { id: associatedObject.instanceId };
|
646
646
|
component.hidden = true;
|
647
|
+
// If "conditional" is defined, the "hidden" property isn't respected.
|
648
|
+
// Remove the "conditional" property after setting "hidden" to true.
|
649
|
+
delete component.conditional;
|
647
650
|
}
|
648
651
|
return {
|
649
652
|
...component,
|
@@ -719,6 +722,9 @@ formComponents, allCriteriaInputs, instance, objectPropertyInputProps, associate
|
|
719
722
|
item.property.id === associatedObject.propertyId) {
|
720
723
|
item.defaultValue = { id: associatedObject.instanceId };
|
721
724
|
item.hidden = true;
|
725
|
+
// If "conditional" is defined, the "hidden" property isn't respected.
|
726
|
+
// Remove the "conditional" property after setting "hidden" to true.
|
727
|
+
delete item.conditional;
|
722
728
|
}
|
723
729
|
}
|
724
730
|
if (nestedFieldProperty) {
|
@@ -733,6 +739,7 @@ formComponents, allCriteriaInputs, instance, objectPropertyInputProps, associate
|
|
733
739
|
item.defaultPages = defaultPages;
|
734
740
|
item.navigateTo = navigateTo;
|
735
741
|
item.allCriteriaInputs = allCriteriaInputs;
|
742
|
+
item.properties = properties;
|
736
743
|
item.isModal = isModal;
|
737
744
|
item.fieldHeight = fieldHeight;
|
738
745
|
item.richTextEditor = ['RepeatableField', 'Object'].includes(item.type)
|