@hmcts/ccd-case-ui-toolkit 6.13.10-show-condition-fix → 6.13.10-show-condition-code-fix
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/bundles/hmcts-ccd-case-ui-toolkit.umd.js +2 -4
- package/bundles/hmcts-ccd-case-ui-toolkit.umd.js.map +1 -1
- package/bundles/hmcts-ccd-case-ui-toolkit.umd.min.js +1 -1
- package/bundles/hmcts-ccd-case-ui-toolkit.umd.min.js.map +1 -1
- package/esm2015/lib/shared/pipes/complex/ccd-read-fields-filter.pipe.js +3 -5
- package/fesm2015/hmcts-ccd-case-ui-toolkit.js +2 -4
- package/fesm2015/hmcts-ccd-case-ui-toolkit.js.map +1 -1
- package/lib/shared/pipes/complex/ccd-read-fields-filter.pipe.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -11246,13 +11246,11 @@
|
|
|
11246
11246
|
}
|
|
11247
11247
|
else if (field.show_condition) {
|
|
11248
11248
|
var cond = void 0;
|
|
11249
|
-
if (fieldId && field.show_condition.indexOf(fieldId) > -1 && !formGroupAvaliable && !!Object.keys(formValue).length) {
|
|
11249
|
+
if (fieldId && field.show_condition.indexOf(fieldId + ".") > -1 && !formGroupAvaliable && !!Object.keys(formValue).length) {
|
|
11250
11250
|
var search = fieldId + '.';
|
|
11251
11251
|
var searchRegExp = new RegExp(search, 'g');
|
|
11252
11252
|
var replaceWith = '';
|
|
11253
|
-
|
|
11254
|
-
var isValidCondition = condition.split('"').length % 2 === 0;
|
|
11255
|
-
cond = ShowCondition.getInstance(isValidCondition ? field.show_condition : condition);
|
|
11253
|
+
cond = ShowCondition.getInstance(field.show_condition.replace(searchRegExp, replaceWith));
|
|
11256
11254
|
}
|
|
11257
11255
|
else {
|
|
11258
11256
|
cond = ShowCondition.getInstance(field.show_condition);
|