JSFiddle - React, Tailwind, and code Playground

HTML

<input id="inpt" type="text">
<select id="slct">
  <option value="0">- select -</option>
  <option value="1">Gram</option>
  <option value="2">Kilo</option>
  <option value="3">Quntal</option>
</select>

JavaScript

$('#inpt').on('keypress input change', function() {
  var Gram = $('#slct').children('[value="1"]');
  if ($(this).val().indexOf('.') > -1) {
    Gram.prop('disabled', true);
    // ====================== this part was added by @SarathChandra 
    // reset the drop down if Gram option was selected
    if ($('#slct').val() === '1' || $('#slct').val() === null) {
      $('#slct').val("0");
    }
    // =========================================================   
  } else {
    Gram.prop('disabled', false);
  }

});