JSFiddle - React, Tailwind, and code Playground
HTML
<select id="myselect">
<option>1</option>
<option>2</option>
<option class="test">3</option>
</select>
JavaScript
$('.test').attr('selected', 'selected');
alert($('#myselect')[0].selectedIndex );