JSFiddle - React, Tailwind, and code Playground
HTML
<select>
<option>Choose</option>
<option value="1">1</option>
<option value="2">2</option>
</select>
<input type="radio" name="radio" value="1" />
<input type="radio" name="radio" value="2" />
JavaScript
(function() {
var sel = document.querySelector("select"),
opts = document.querySelectorAll("input[type='radio']");
sel.addEventListener('change', function() {
var val = this.options[this.selectedIndex].value;
for(var i=0, max = opts.length; i<max; i++) {
if (opts[i].value == val) {
opts[i].checked = "checked";
}
}
});
for(var i=0, max = opts.length; i<max; i++) {
opts[i].addEventListener('click', function() {
var val = this.value;
for (var i=0, max=sel.options.length; i<max; i++) {
if (sel.options[i].value == val) {
sel.options[i].selected = "selected";
return;
}
}
});
}
})();