Directional Light shadow camera - changing near and far?

I try to change Directional Light shadow camera with dat.GUI:

mydirecdir.add(mydirec.getObjectByName('li'), "far", 0, 300, 10).name("shadow far").onChange(function(){mydirecchange()}).listen();

getObjectByName(‘li’) is in a group and there const li = new THREE.DirectionalLight;

mydirecchange() only updates the

For example position and target and so on are ok.
And dat.GUI shows the correct value of far but no changing with update
Is it in principle possible to change the far-value in this way?
Thank you.