JSFiddle - React, Tailwind, and code Playground

HTML

<select>
  <option value="other">Restrict number of values </option>
  <option>Unlimited values</option>
</select>
<input type="number" size="20">

JavaScript

$(document).ready(function() {
  $('select').change(function() {
    if (this.value == 'other') {
      $('input').show();
    }
    else {
      $('input').hide();
    }
  });
});