I'm trying to set a PuiRadioButton
to checked
but I've encountered a problem. The underlying pure HTML input elements gets selected, but PrimeUI does not show the change.
I've the two elements:
<input type="radio" name="peopleSelection" id="peopleRadioButton" value="people" checked="checked" />
and
<input type="radio" name="peopleSelection" id="groupRadioButton" value="group" />
and I've tried following statement
$('#groupRadioButton').attr('checked', 'checked');
It works perfetly fine in a JSFiddle. But when I inspect the HTML, the correct input element is checked successfully, but not shown by PrimeUI.
I also tried variations of these:
$('#groupRadioButton').prop('checked', true);
$('#groupRadioButton').attr('checked', 'checked');
$('#groupRadioButton')[0].checked = true;
Unfortunately I could not find a set
or get
method on the PrimeUi Documentation page.
How do select/unselect PrimeUI radio buttons?
Thanks in advance