title: HTML input set type from value
body: <p>Is there any known way of getting the input tag type by checking the default value set for that input?</p>
  <p>i.e. if the input default value is set to true or false the input type should be checkbox and the same for date and all other types</p>
  <p>here is the code that I want to detect the field value (there are date props and bool props, but they are all rendered as type text input)</p>
  <pre><code>Object.keys(user).map(key =&gt; &lt;h4&gt;{key} : &lt;input type=&quot;auto-detect&quot; value={user[key]} /&gt;&lt;/h4&gt;)
  </code></pre>
  <p>And this is the value of <code>user</code> that I get from the api</p>
  <pre><code>{
    id: 18273009, // input type=&quot;number&quot;
    firstName: &quot;admin&quot;, // input type=&quot;text&quot;
    lastName: &quot;user&quot;, // input type=&quot;text&quot;
    email: &quot;admin@gmail.com&quot;, // input type=&quot;email&quot;
    phone: &quot;9178888888&quot;, // input type=&quot;tel&quot;
    address: &quot;123 abc Dr&quot;, // input type=&quot;text&quot;
    isLogged: &quot;b2e74b00-e1a6-44bd-833f-7dba2e98c10e&quot;, // input type=&quot;text&quot;
    loginTime: &quot;2022-04-12T17:20:00.2176106&quot;, // input type=&quot;datetime&quot;
    dateJoined: &quot;2022-03-30T14:12:13.1303726&quot;, // input type=&quot;datetime&quot;
    isMember: false, // input type=&quot;checkbox&quot;
    isAdmin: false, // input type=&quot;checkbox&quot;
    isSysAdmin: false, // input type=&quot;checkbox&quot;
    planType: &quot;Free&quot;, // input type=&quot;text&quot;
    streamsToday: 194, // input type=&quot;number&quot;
    listIpAddress: [], // don't render, or render &lt;select&gt;
  }
  </code></pre>