JSFiddle - React, Tailwind, and code Playground
HTML
<select>
<option>Foo</option>
<option>Barrrr</option>
<option>Baseball!!</option>
</select>
<input type="text"/>
CSS
.fix {
position: fixed;
}
.normal {
position: absolute;
}
.box{
width: 100px;
height: 100px;
background-color: red;
}
#content {
background-color: blue;
width: 400px;
height: 2400px;
}
JavaScript
$(function(){
$('select').bind('change', function(){
$('input').val($(this).val());
});
});