JSFiddle - React, Tailwind, and code Playground

HTML

<select onchange="teste(this)">
  <option value="ba">Bahia</option>
  <option value="sp">São Paulo</option>
</select>

<input id="psi_funcao_exercida" type="hidden" value = "1">

JavaScript

function teste(combo) {
   if (document.getElementById("psi_funcao_exercida").value == '1' && combo.options[combo.selectedIndex].value == 'sp') {
     alert('modificou!');
   }   
}