@hmcts/ccd-case-ui-toolkit 7.3.2-exui-3807-3726-3739 → 7.3.2-exui-3740
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.
|
@@ -3931,7 +3931,7 @@ class FieldsUtils {
|
|
|
3931
3931
|
// Handling of Dynamic Lists in Complex Types
|
|
3932
3932
|
static SERVER_RESPONSE_FIELD_TYPE_COLLECTION = 'Collection';
|
|
3933
3933
|
static SERVER_RESPONSE_FIELD_TYPE_COMPLEX = 'Complex';
|
|
3934
|
-
static SERVER_RESPONSE_FIELD_TYPE_DYNAMIC_LIST_TYPE = ['DynamicList', 'DynamicRadioList'];
|
|
3934
|
+
static SERVER_RESPONSE_FIELD_TYPE_DYNAMIC_LIST_TYPE = ['DynamicList', 'DynamicRadioList', 'DynamicMultiSelectList'];
|
|
3935
3935
|
static isValidDisplayContext(ctx) {
|
|
3936
3936
|
return (ctx === 'MANDATORY' || ctx === 'READONLY'
|
|
3937
3937
|
|| ctx === 'OPTIONAL' || ctx === 'HIDDEN'
|
|
@@ -4178,9 +4178,12 @@ class FieldsUtils {
|
|
|
4178
4178
|
if (dynamicListValue) {
|
|
4179
4179
|
const list_items = dynamicListValue[0].list_items;
|
|
4180
4180
|
const complexValue = dynamicListValue.map(data => data.value);
|
|
4181
|
+
const selectedValue = field.field_type.type === 'DynamicMultiSelectList'
|
|
4182
|
+
? (complexValue[0] || [])
|
|
4183
|
+
: (complexValue.length > 0 ? complexValue : undefined);
|
|
4181
4184
|
const value = {
|
|
4182
4185
|
list_items,
|
|
4183
|
-
value:
|
|
4186
|
+
value: selectedValue
|
|
4184
4187
|
};
|
|
4185
4188
|
field.value = {
|
|
4186
4189
|
...value
|