title: Can I change the value of Value in e.target.value?
body: <p>I have an autocomplete which functions as an employee search field.  When a user searches for a name and chooses one from the results list, the <code>onBadgeChange</code> function is triggered.  This function sends the value of <code>e.target.value</code> into another <code>onChange</code> as <code>e</code>. The value of <code>e.target.value</code> after selecting a name is the index of the name as it appeared in the results list.  The index of the name as it appears is not useful data.  What I need to get is the employee badge number.  This is done in <code>onBadgeChange</code> where the employee badge number is set to <code>const empBadge</code>.  I want to then change the value of <code>e.target.value</code> to the value of <code>empBadge</code>.  Is this possible?</p>
  <p>This is my <code>onBadgeChange</code>:</p>
  <pre><code>    const [empBadge, setEmpBadge] = useState(null);
  
      const onBadgeChange = (e) =&gt; {
          e.preventDefault();
          employees.employees?.map((emp) =&gt; {
              setEmpBadge(emp.Badge);
              return console.log(emp.Badge, emp.Name);
          });
          console.log(e.target.value);
          console.log(e.target.textContent);
          console.log(empBadge);
          onChange(e);
      };
  </code></pre>