calculated fields referencing cascade parent and filter

taubes

Member
Hi,

A little inconsistency. If you have a calculated field referencing a cascade parent and filter field:

If you update the cascade parent the calculated field is not properly updated. It correctly shows the new cascade parent but incorrectly the old non-matching cascade filter value although no longer visible in the browser.

When you save the entry it then updates calculated field correctly again also when you change the cascade filter value. So not a big problem but annoying when you program the calculated field.

Best

St
 

eugenio

Administrator
Staff member
You are right!

A quick fix, in include/header, add this line:

$('select[name="'+key+'"]').trigger('change');

after these lines:

if ( $('select[name="'+key+'"]').hasClass("searchable_select") ){

$('select[name="'+key+'"]').select2({dropdownAutoWidth : 'true',allowClear: true,width: 'auto',minimumInputLength: <?php echo $ajax_dropdown_minimum_input_length; ?>});
}

let me know if it works; I'll add the fix to the next release.

Best,
 
Top