@evoke-platform/ui-components 1.5.0-testing.4 → 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
- handleComponentChange: (components: any, value: any) => void;
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.handleComponentChange = (components, value) => {
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.handleComponentChange(this.root.components, value);
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
- this.attach(this.element);
150
+ if (this.element) {
151
+ this.attach(this.element);
152
+ }
156
153
  });
157
154
  }
158
155
  if (this.component.type === 'Date') {
@@ -59,7 +59,7 @@ export class RepeatableFieldComponent extends ReactComponent {
59
59
  }
60
60
  }
61
61
  this.updatedCriteria = updateCriteriaInputs(this.criteria ?? {}, data, this.component.user);
62
- this.attachReact(this.element);
62
+ this.attach(this.element);
63
63
  });
64
64
  }
65
65
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evoke-platform/ui-components",
3
- "version": "1.5.0-testing.4",
3
+ "version": "1.5.0-testing.6",
4
4
  "description": "",
5
5
  "main": "dist/published/index.js",
6
6
  "module": "dist/published/index.js",