@hmcts/ccd-case-ui-toolkit 7.0.31-dynamic-multi-list-fix → 7.0.32

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.
@@ -5216,8 +5216,7 @@ class FieldTypeSanitiser {
5216
5216
  if (!data || !caseFields) {
5217
5217
  return;
5218
5218
  }
5219
- caseFields = this.ensureDynamicMultiSelectListPopulated(caseFields);
5220
- caseFields.forEach((caseField) => {
5219
+ caseFields.forEach(caseField => {
5221
5220
  // tslint:disable-next-line:switch-default
5222
5221
  switch (caseField.field_type.type) {
5223
5222
  case FieldTypeSanitiser.FIELD_TYPE_DYNAMIC_MULTISELECT_LIST:
@@ -5240,16 +5239,6 @@ class FieldTypeSanitiser {
5240
5239
  }
5241
5240
  });
5242
5241
  }
5243
- ensureDynamicMultiSelectListPopulated(caseFields) {
5244
- return caseFields.map((field) => {
5245
- if (field.field_type.type !== 'Complex') {
5246
- return field;
5247
- }
5248
- const complexFieldsUpdated = field.field_type.complex_fields.map((complexField) => complexField.field_type.type === FieldTypeSanitiser.FIELD_TYPE_DYNAMIC_MULTISELECT_LIST && complexField.display_context !== 'HIDDEN' && field._value && field._value[complexField.id]
5249
- ? { ...complexField, list_items: field._value[complexField.id].list_items } : complexField);
5250
- return { ...field, field_type: { ...field.field_type, complex_fields: complexFieldsUpdated } };
5251
- });
5252
- }
5253
5242
  convertArrayToDynamicListOutput(field, data) {
5254
5243
  const values = data[field.id];
5255
5244
  if (Array.isArray(values)) {