title: How to display an icon inside input field which got updated?
body: <p>I have input boxes which are mapped with an object.</p>
  <p>Looking for a solution if the input got updated or any user typed something in input field and then submit then that input field should display an icon inside it(for example if someone updated the first and last input field than only first and last field should contain the icon(Admin) other input boxes should be as it is.)</p>
  <pre><code>import React, { useState } from &quot;react&quot;;
  import Admin from 'icons'
  //more imports
  
  export default function InputCom() {
    
    const [value, setValue] = useState(&quot;&quot;);
  
    const data = [
      { label: &quot;first&quot;, name: &quot;first&quot; },
      { label: &quot;last&quot;, name: &quot;last&quot; },
      { label: &quot;phone&quot;, name: &quot;phone&quot; },
    ];
  
    const handleChange = (event) =&gt; {
      setValue(event.target.value);
    };
  
  const handleClick = () =&gt; {
  console.log(vlaue)
  }
    return (
      &lt;div &gt;
        &lt;Card &gt;
          &lt;div &gt;
            {data.map((item, key) =&gt; (
              &lt;div key={key.name} &gt;
                &lt;input
                  //icon={Admin}
                  label={item.name}
                  name={item.name}
                  onChange={handleChange}
                  placeholder=&quot;text&quot;
                  value={value}
                /&gt;
              &lt;/div&gt;
            ))}
          &lt;/div&gt;
        &lt;/Card&gt;
       &lt;button onClick={handleClick}&gt;submit&lt;button&gt;
      &lt;/div&gt;
    );
  }
  
  
  </code></pre>