Hello,
I have this html:
<sp-radio-group class="radioGroup">
<sp-radio name="cropType" value="regular" checked>Regular</sp-radio>
<sp-radio name="cropType" value="edito">Edito</sp-radio>
<sp-radio name="cropType" value="display">Display</sp-radio>
</sp-radio-group>
and i want to change the checked radio button to “Edito“
const radioGroup = document.querySelector('.radioGroup');
const radios = radioGroup.querySelectorAll('sp-radio');
radioGroup.value = radios[1].getAttribute('value');
radioGroup.dispatchEvent(new Event('change', { bubbles: true }));
console.log("new value:", radioGroup.value);
radios[1].getAttribute(‘value’) = edito
but new value is still: regular
and the UI is not not updated (first radio button still checked)
Thank you for your help,
fred