JSFiddle - React, Tailwind, and code Playground
HTML
<select>
<option value=''>option 1</option>
<option value='new'>new option</option>
</select>
JavaScript
$(function(){
$('select').change( function(){
var value = $(this).val();
if (value == 'new') {
var other = prompt('Add new:');
if(!other) return false;
$(this).append('<option value"'
+ other
+ '" selected="selected">'
+ other
+ '</option>');
}
});
});