OK i have a solution, the problem is that dynupdate.js doesn't recalls cvfind.js after we select item from the dropdown. I guess that because it calls AJAX, we lose the cvfind binding.
So to solve it i added two things to the code:
1. on /virtuemart/administrator/components/com_virtuemart/models/customfields.php
after line 869 i added a function:
$j = "
function getSelectorVariants() { return [".$jsVariants."]; }
jQuery('#".implode(',#',$tags)."').off('change',Virtuemart.cvFind);
jQuery('#".implode(',#',$tags)."').on('change', { variants:[".$jsVariants."] },Virtuemart.cvFind);
";
so the php will compile the needed list.
and then on /virtuemart/components/com_virtuemart/assets/js/dynupdate.js
after line 72 i've added a variable that gets the above list, and re-binded the cvFind:
Virtuemart.updateDynamicUpdateListeners = function() {
$__list = getSelectorVariants();
jQuery('*[data-dynamic-update=1]').each(function(i, el) {
var nodeName = el.nodeName;
el = jQuery(el);
console.log('updateDynamicUpdateListeners '+nodeName, el);
switch (nodeName) {
case 'A':
el[0].onclick = null;
el.off('click',Virtuemart.updL);
el.on('click',Virtuemart.updL);
break;
default:
el[0].onchange = null;
el.off('change',Virtuemart.cvFind);
el.on('change', { variants: $__list },Virtuemart.cvFind);
el.off('change',Virtuemart.upd);
el.on('change',Virtuemart.upd);