@evoke-platform/ui-components 1.5.0-testing.5 → 1.5.0-testing.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.
@@ -35,7 +35,7 @@ export declare class FormFieldComponent extends ReactComponent {
|
|
35
35
|
*/
|
36
36
|
manageFormErrors(): void;
|
37
37
|
beforeSubmit(): void;
|
38
|
-
|
38
|
+
handleAddressChange: (components: any, value: any) => void;
|
39
39
|
handleChange: (key: string, value: any) => void;
|
40
40
|
attachReact(element: Element): void;
|
41
41
|
}
|
@@ -61,7 +61,7 @@ export class FormFieldComponent extends ReactComponent {
|
|
61
61
|
selectOptions,
|
62
62
|
inputMaskPlaceholderChar: component.inputMaskPlaceholderChar || '_',
|
63
63
|
}, options, data);
|
64
|
-
this.
|
64
|
+
this.handleAddressChange = (components, value) => {
|
65
65
|
if (isArray(components)) {
|
66
66
|
if (components.filter((component) => Object.hasOwnProperty.call(component, 'components'))) {
|
67
67
|
components
|
@@ -93,12 +93,7 @@ export class FormFieldComponent extends ReactComponent {
|
|
93
93
|
else {
|
94
94
|
selectedValue = value.line1;
|
95
95
|
label = value.line1;
|
96
|
-
this.
|
97
|
-
this.root.components
|
98
|
-
.filter((component) => Object.prototype.hasOwnProperty.call(component, 'components'))
|
99
|
-
.forEach((section) => {
|
100
|
-
this.handleComponentChange(section.components, value);
|
101
|
-
});
|
96
|
+
this.handleAddressChange(this.root.components, value);
|
102
97
|
}
|
103
98
|
}
|
104
99
|
else if (this.component.property.type === 'choices' || this.component.property.type === 'array') {
|
@@ -152,7 +147,9 @@ export class FormFieldComponent extends ReactComponent {
|
|
152
147
|
this.on('changed-' + this.component.key, (value) => {
|
153
148
|
this.setValue(value ?? '');
|
154
149
|
this.updateValue(value, { modified: true });
|
155
|
-
|
150
|
+
if (this.element) {
|
151
|
+
this.attach(this.element);
|
152
|
+
}
|
156
153
|
});
|
157
154
|
}
|
158
155
|
if (this.component.type === 'Date') {
|